display dollar sign in php

by Ramya 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 - $

Tagged in:

6813
like
0
dislike
0
mail
flag

You must LOGIN to add comments