Do you know would I use print "$a dollars” or "{$a} dollars” to print out the amount of dollars in this example?
Answer Posted / Rahul Sagar
To print out the amount of dollars using a variable $a, you should use the second option: "{$a} dollars". The curly braces tell PHP to interpret $a as a variable.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers