You are here: What's the safest way to destory/wipe out the arrays within the associative arrays? « PHP « IT news, forums, messages
What's the safest way to destory/wipe out the arrays within the associative arrays?

Posted by "Scott Fletcher" on 10/17/71 11:28

[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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация