php - taking out only arithmatic operater in variable -


value -1 want take out - sign in variable how can this

if want store "-" (minus) sign in separate variable, need use substr() function.

<?php     echo substr('-1', 0, 1); // result in "-" ?> 

Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

javascript - AngularJS - Uncaught Error: [$injector:modulerr] Failed to instantiate module -

ios - Swift Array Resetting Itself -