Jump to content

[SOLVED] Need help merging code


Dada78

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.