---
title: "Would I use print \"$a dollars\" or \"{$a} dollars\" to print out the amount of dollars in this example?"  
description: "Would I use print \"$a dollars\" or \"{$a} dollars\" to print out the amount of dollars in this example?"  
author: "Anonymous User"  
published: 2012-05-04  
updated: 2020-09-17  
canonical: https://www.mindstick.com/interview/1432/would-i-use-print-a-dollars-or-a-dollars-to-print-out-the-amount-of-dollars-in-this-example  
category: "php"  
tags: ["php"]  
reading_time: 1 minute  

---

# Would I use print "$a dollars" or "{$a} dollars" to print out the amount of dollars in this example?

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.

## Answers

### Answer by Anonymous User

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.


---

Original Source: https://www.mindstick.com/interview/1432/would-i-use-print-a-dollars-or-a-dollars-to-print-out-the-amount-of-dollars-in-this-example

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
