php - Confused about echo "{$a[0]['download']}" -


i accidentally tested today, can explain me why works , is?

$a = array( array( 'download' => '1500k'    ) );  echo "test-{$a[0]['download']}"; 

output : test-1500k

double quotes evaluate string expression , extract variable , put value instead. single quote show string as is.

if want more detail can see this answer in so.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -