01-10-2009, 08:05 PM
|
#1 (permalink)
|
|
The Acquainted
Join Date: Sep 2007
Posts: 126
Thanks: 4
|
Save output from foreach into an array
I have written the following code:
PHP Code:
$xml_location = 'http://www.*******.com/webmasters/promo/dumpsmart.php?coupon=1866248';
$xml_import = simplexml_load_file($xml_location);
foreach ($xml_import->video as $video) {
printf($video->id);
printf($video->title);
$flvdir = $video->clip_url;
foreach ($video->clips as $clips) {
foreach ($clips->clip as $clip) {
printf($flvdir . $clip->flv);
}
}
}
How do I save the output of the following into an array?
PHP Code:
foreach ($clips->clip as $clip) {
printf($flvdir . $clip->flv);
}
Thanks in advance :)
|
|
|
|