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-04-2012 8:05 AM

 1 Answer(s)
  1825  View(s)
Rate this:

Arun Singh

Total Post:310

Posted on    May-04-2012 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