Are "value" and 'value' synonymous?


#1

When typing an associative array, I tried both "value" and 'value' and they both worked. Is this true in all cases? Are they interchangeable? Here is my code:

$assocCar = array('year' => 2012,
'colour' => 'blue',
'doors' => 5,
'make' => "BMW");

vs

$assocCar = array('year' => 2012,
'colour' => 'blue',
'doors' => 5,
'make' => 'BMW');


#2

I barely know any Ruby, but my understanding is that double quotes are required when doing string interpolation, otherwise they are equivalent.