Re: PHP Complex Data Structures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 18 May 2005 01:28:07 -0000,  wrote:

>* Zzapper <david@xxxxxxxxxx>:
>> I seem to remember that you access/use PHP data in the same/similar
>> way to Perl data and that you can create complex data structures ie
>> arrays of arrays, arrays of records etc.
>>
>> For once Google let me down so can any one point at any doc info.
>
>Did you try building any complex data structures? You could have whipped
>out something to test pretty quickly. The quick answer is, 'Yes'. 
>
>The longer answer is: cut-and-past the following into a script and see
>what you get:
>
>$cds = array(
>    'element1' => array(
>        'string1',
>        'string2',
>        'string3'
>    ),
>    'element2' => true,
>    'element3' => array(
>        'subelement1' => array(
>            array(1, 2, 3),
>            2,
>            3
>        )
>    )
>);
>var_dump($cds);
thx 4 various answers

which also lead me to 

http://uk2.php.net/manual/en/language.types.array.php Example 11-11. Recursive and multi-dimensional
arrays.

I seem to remember from a previous life that you can operate directly on PHP data, I mean you don't
have to use the PHP primitives.


-- 
zzapper
vim -c ":%s%s*%Cyrnfr)fcbafbe[Oenz(Zbbyranne%|:%s)[[()])-)Ig|norm Vg?"
http://www.rayninfo.co.uk/tips/ vim, zsh & success tips

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux