craigy72 Posted May 7, 2008 Share Posted May 7, 2008 AS you can see I'm trying to create a feed and declare the data is CDATA. The only issue I have is that when I end the php, it ends the CDATA. Does anyone have any suggestions to get around this? ?><?php echo('<?xml version="1.0" encoding="utf-8"?>'); ?> <images> <?php if ($totalRows_rsImages > 0) { // Show if recordset not empty ?> <?php do { ?> <image> <ID><?php echo $row_rsImages['ID']; ?></ID> <album><![CDATA[<?php echo $row_rsImages['AlbumName']; ?>]]></album> <path><![CDATA[<?php echo $row_rsImages['ImagePath']; ?>]]></path> <description><![CDATA[<?php echo $row_rsImages['ImageDescription']; ?>]]></description> <date><![CDATA[<?php echo $row_rsImages['UploadDate']; ?>]]></date> </image> <?php } while ($row_rsImages = mysql_fetch_assoc($rsImages)); ?> <?php } // Show if recordset not empty ?> </images> <?php mysql_free_result($rsImages); ?> Link to comment https://forums.phpfreaks.com/topic/104566-code-check/ Share on other sites More sharing options...
deansatch Posted May 7, 2008 Share Posted May 7, 2008 have you tried echoing the cdata? e.g. <?php echo "<album><![CDATA[".$row_rsImages['AlbumName']."]]></album>" ;?> Link to comment https://forums.phpfreaks.com/topic/104566-code-check/#findComment-535340 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.