|
Posted by Jerry Stuckle on 02/04/06 04:30
Jim Carlock wrote:
> For arrays of arrays, how do I access the "ani/pic-1.gif" element?
>
> $aImages = array("custom_pools", array(array("ani/pic-1.gif",
> "Replica 1974 Gibson Les Paul Guitar", "pic-1.jpg",
> "description", "pagetitle", "metadescription", "metakeywords",
> "<h1>h1</h1>"),
>
> I tried $aImages[0][0] but that returns "c".
> I then tried $aImages[0][1], and that returns "u".
> I then tried $aImages[0][0][0] and that returns an empty string.
>
> I did get another array(array to return the proper values, but now
> that I placed a string as the first element and an array of arrays as
> the second element... :-z
>
> Thanks.
>
> Jim Carlock
> Post replies to the newsgroup.
>
>
$aImages[0] is "custom_pools", so it's returning exactly what it's
supposed to - the first or second character in the string.
$aImages[1][0][0] is "ani/pic-1.gif". You also have $aImages[1][0][1],
$aImages[1][0][2], etc.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|