= 'THREE'=3, 'FOUR'=4;
eval(\$data2 = array('ONE'=1,'TWO'=2,$str););
Max Sullivan wrote:
I am trying to populate array values and keys from a variable with no
luck.
Lets say I have the following array.
$data1 = array('ONE'=1,'TWO'=2,'THREE'=3,'FOUR'=4);
And I want to create part of the array
I am trying to populate array values and keys from a variable with no
luck.
Lets say I have the following array.
$data1 = array('ONE'=1,'TWO'=2,'THREE'=3,'FOUR'=4);
And I want to create part of the array with the string below:
$str= 'THREE'=3, 'FOUR'=4;
$data2 = array('ONE'=1,'TWO'=2,$str);
2 matches
Mail list logo