If I have a variable,
$var1 = 'foo'; //but this value might change over time.
How can I assign the value of $var1 to array $array1?
I tried
$array1 = array('key1' => $var1;)
but this doesn't seems to work.
If I have a variable,
$var1 = 'foo'; //but this value might change over time.
How can I assign the value of $var1 to array $array1?
I tried
$array1 = array('key1' => $var1;)
but this doesn't seems to work.