display dollar sign in php
by Ramya[ Edit ] 2010-11-09 14:41:19
display dollar sign in php:
Normally if you use '$' in php it considers as a variable declaration. In case if you want to display it as a string then use '\' in front of the dollar sign as,
<?php echo " Dollar Sign - \$"; ?>
results as,
Dollar Sign - $