On Fri, 2004-10-15 at 08:34, Arnold wrote:
> Hi,
> 
> How can i add new items to an array without using an index.
> Normally (single dimension) you can do:  Arr[]="xxxxx" and this item is
> added to the array, but what if i have subitems like:
> Arr[]['name']="arnold"; Arr[]['address']="street".
> This last example doesnt work and i think there will be an easy solution but
> who can tell me this?

You mean like this...

    $sub = array
    (
        'name' => 'Ahhhhhnold',
        'address' => '123 Someplace Nice',
    );

    $bigArray[] = $sub;

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

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

Reply via email to