Jump to content

Code Check:


craigy72

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.