Is it possible to append a url path to a textnode that was generated via a loop?



I have a php script that outputs XML. This is done by looping through a database and then adding each field found as a node and then the content of that field as a text node. Originally this worked great... Only problem now is I have an image in a database. Lets say image1.jpg.


So the xml node is



<image>image1.jpg</image>


but i need it to be



<image>http://ift.tt/1zGprch;


Now in an earliery version I had code like



($r['fieldname'])


So i could just use the dot to concationate but now that I'm using a loop to actually generate the entire document, is there any way to add this string?


In theory I could try:



if$column_name == 'item_name'){
$val = 'hello' . $val;
}

No comments:

Post a Comment