What's the safest way to destory/wipe out the arrays within the associative arrays?

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

 



[code]
$xml = array
(
  'NEWSFEED' => array
  (
    '0' => array
    (
      'MESSAGE' => array
      (
        '0' => array
        (
          'ATTRIBUTES' => array
          (
            'ID' => 'test2',
            'TID' => 'test4'
          ),
          'TITLE' => array
          (
            '0' => array
            (
               'VALUE' => 'Title #1'
            ),
            '1' => array
            (
               'VALUE' => 'Title #2'
            )
          ),
           'BODY' => array
          (
            '0' => array ( 'VALUE' => 'Body #1' )
          ),
          'REFERENCE' => array
          (
            '0' => array ( 'VALUE' => 'Reference #1' )
          )
        ),
        '1' => array
        (
          'TITLE' => array
          (
            '0' => array ( 'VALUE' => 'Title #2' )
          ),
          'BODY' => array
          (
            '0' => array ( 'VALUE' => 'Body #2' )
          ),
        ),
        '2' => array
        (
          'ATTRIBUTES' => array
          (
            'ID' => 'test3'
          ),
          'BODY' => array
          (
            '0' => array ( 'VALUE' => 'Body #3' )
          ),
        )
      )
    )
  ),
 );

echo $xml['NEWSFEED']['0']['MESSAGE']['0']['BODY'];
echo $xml['NEWSFEED']['0']['MESSAGE']['1']['BODY'];
echo $xml['NEWSFEED']['0']['MESSAGE']['2']['BODY'];[/code]

What is the safest way to destroy or take out the
$xml['NEWSFEED']['0']['MESSAGE']['2']..... associative arrays starting with
['2'] and those arrays inside of the ['2'] array path?

The unset() would make it not possible to reassign the data to this array
once again, that is what I do not want.

Thanks,
FletchSOD

-- 
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