Discussion: returning an array
Afficher un message
Vieux 20/06/2008, 17h16   #5
Erwin Moller
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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
  Réponse avec citation
 
Page generated in 0,04377 seconds with 9 queries