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

python - jinja2: TemplateSyntaxError: expected token ',', got 'string' -

Qt4: how to send QString inside a struct via QSharedMemory -

node.js - NodeJS remote terminal to Dropbear OpenWRT-Server -