I have a problem with XML data generated by a PHP file.
here is my code:
$requestXmlBody .= "<PictureURL>";
//find black
while($row = mysql_fetch_object($ergebnis))
{
$posblack = strpos($row->image, $findBLACK);
if ($posblack !== false)
{
echo $row->image;
}
}
$requestXmlBody .= "</PictureURL>";
This code will generate the XML Code
<PictureURL></PictureURL>
but not the name I fetch from the database. The database query is working but my problem ist to have it inserted between the XML code. Usually a variable is inserted like this
$requestXmlBody .= '<PictureURL>$variable</PictureURL>';
I just don't know how to wrap this around my database query.
Any help is very appreciated.
echo(for the image URL). Decide on one. Place both in the loop and if block.