Beginnner needs help with For Each
Posted: Mon May 18, 2009 12:24 pm
I'm very new to programming so I apologize in advance if this is a stupid question!
I'm need the results of a for each loop saved as a variable. Here is what I'm trying:
Does anyone know how to do this? Thanks for anyone's help!
I'm need the results of a for each loop saved as a variable. Here is what I'm trying:
Code: Select all
$sitemap = "foreach( $finalurl as $key => $value){
echo '<url><loc>http://www.$mainsiteurl.com/$finalurl[$key]</loc><changefreq>daily</changefreq><priority>0.9</priority></url>';
}";