Home > DeveloperSection > Interviews > Would I use print "$a dollars" or "{$a} dollars" to print out the amount of dollars in this example?

Posted on    May-20-2011 2:16 AM

 PHP PHP 
Ratings:
 1 Answer(s)
  1093  View(s)
Rate this:

Awadhendra Tiwari

Total Post:510

Points:2550
Posted on    May-20-2011 12:00 AM

In this example it wouldn’t matter, since the variable is all by itself, but if you were to print something like "{$a},000,000 mln dollars", then you definitely need to use the braces.

Don't want to miss updates? Please click the below button!

Follow MindStick