Dada78 Posted January 30, 2008 Share Posted January 30, 2008 I am not sure how to merge this. I have tried but was unable to get it to work. What I am needing to do is add the $rows below $row["city"] $row["state"] $row["postal"] Need to add to this below behind row["address"] echo 'address="' . parseToXML($row['address']) . '" '; If anyone can help me out with this that would be great! -Thanks Quote Link to comment https://forums.phpfreaks.com/topic/88533-solved-need-help-merging-code/ Share on other sites More sharing options...
Prismatic Posted January 30, 2008 Share Posted January 30, 2008 Try, <?php echo 'city="'. parseToXML($row["city"]) .'" state="'. parseToXML($row["state"]) .'" postal="'. parseToXML($row["postal"]) .'" address="' . parseToXML($row['address']) . '"'; ?> I'm not sure if by behind you meant before, sorry :/ Quote Link to comment https://forums.phpfreaks.com/topic/88533-solved-need-help-merging-code/#findComment-453227 Share on other sites More sharing options...
Dada78 Posted January 30, 2008 Author Share Posted January 30, 2008 Yea I think I need to be more clear. I need to merge this $row["city"] $row["state"] $row["postal"] Behind this. $row['address'] Something like this but this doesn't work. echo 'address="' . parseToXML($row['address'], $row["city"], $row["state"], $row["postal"]) . '" '; I need all that to be included in the variable address above. Hope that makes sense. Quote Link to comment https://forums.phpfreaks.com/topic/88533-solved-need-help-merging-code/#findComment-453228 Share on other sites More sharing options...
Prismatic Posted January 30, 2008 Share Posted January 30, 2008 oh ok I gotcha echo 'address="'. parseToXML($row["address"]) .' '. parseToXML($row["city"]) .' '. parseToXML($row["state"]) .' ' . parseToXML($row['postal']) . '"'; Quote Link to comment https://forums.phpfreaks.com/topic/88533-solved-need-help-merging-code/#findComment-453230 Share on other sites More sharing options...
Dada78 Posted January 30, 2008 Author Share Posted January 30, 2008 Thank, that works but will a small issue. If you go to http://www.mesquitechristmas.com/local/phpsqlajax_genxml2.php You will notice it is showing an error because their is no space before lat=. Not sure how to add a space to that. // ADD TO XML DOCUMENT NODE echo '<marker '; echo 'displayname="' . parseToXML($row['displayname']) . '" '; echo 'address="'. parseToXML($row["address"]) .' '. parseToXML($row["city"]) .' '. parseToXML($row["state"]) .' ' . parseToXML($row['postal']) . '"'; echo 'lat="' . $row['lat'] . '" '; echo 'lng="' . $row['lng'] . '" '; echo '/>'; } // End XML file Any idea what I need to do? Quote Link to comment https://forums.phpfreaks.com/topic/88533-solved-need-help-merging-code/#findComment-453233 Share on other sites More sharing options...
Prismatic Posted January 30, 2008 Share Posted January 30, 2008 echo ' lat="' . $row['lat'] . '" '; Quote Link to comment https://forums.phpfreaks.com/topic/88533-solved-need-help-merging-code/#findComment-453235 Share on other sites More sharing options...
Dada78 Posted January 30, 2008 Author Share Posted January 30, 2008 I am not sure I follow you. I already have that, look in the last code I posted. Quote Link to comment https://forums.phpfreaks.com/topic/88533-solved-need-help-merging-code/#findComment-453236 Share on other sites More sharing options...
Prismatic Posted January 30, 2008 Share Posted January 30, 2008 I added a space in before the lat= part for you. Quote Link to comment https://forums.phpfreaks.com/topic/88533-solved-need-help-merging-code/#findComment-453237 Share on other sites More sharing options...
Dada78 Posted January 30, 2008 Author Share Posted January 30, 2008 Ok gotcha, that works great now and everything is perfect, Thank you for all your help. Quote Link to comment https://forums.phpfreaks.com/topic/88533-solved-need-help-merging-code/#findComment-453239 Share on other sites More sharing options...
Prismatic Posted January 30, 2008 Share Posted January 30, 2008 You're very welcome Quote Link to comment https://forums.phpfreaks.com/topic/88533-solved-need-help-merging-code/#findComment-453240 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.