Re: returning an array
Jeff schreef:
> Iván Sánchez Ortega wrote:
>> Jeff wrote:
>>
>>> $array = array('one'=>'1','two'=array('more than one'=>'dimension'));
>>
>> $array = array('one'=>'1','two'=>array('more than one'=>'dimension'));
>>
>>
> Yes, a typo. The actual code though is drawing from an unserialized
> file, so I know the syntax php generated is corrected is correct. I also
> checked the array just before it got returned and it looked fine.
>
> Are you saying that I can return an array that way?
>
> Jeff
Yes,
$myArr = array (
1 => 12,
50 => "hello fifty",
"IamAssoc" => array(23,45,77),
"meToo" => array("one" => 1, "two" => 2)
)
is perfectly fine.
Regards,
Erwin Moller
|