问题描述:

value is -1

i want to take out - sign in a variable how can i do this

网友答案:

If you want to store the "-" (minus) sign in a separate variable, you need to use the substr() function.

<?php
    echo substr('-1', 0, 1); // will result in "-"
?>
网友答案:

These sql useful to you.

select replace(column_name,'-','') from table_name

Eg:- select replace(-1,'-','')

Thank you.

相关阅读:
Top