Note that there are some explanatory texts on larger screens.

plurals
  1. PORSS and PHP merging
    primarykey
    data
    text
    <p>I've got the following code which is causes me some issues</p> <pre><code>&lt;?PHP include("../panel/config.php"); #// Timetable Clearup Variabls $yesterday = strtotime('yesterday'); $yesterdow = date('l',$yesterday); $order = "SELECT * FROM timetable WHERE day = '$yesterdow' ORDER BY time"; $result = mysql_query($order); $yesterdayd = date('F jS, Y', time()-86400); //SET XML HEADER header('Content-type: text/xml'); //CONSTRUCT RSS FEED HEADERS $output = '&lt;rss version="2.0"&gt;'; $output .= '&lt;channel&gt;'; $output .= "&lt;title&gt;Timetable - {$yesterdayd} &lt;/title&gt;"; $output .= '&lt;description&gt;Timetable.&lt;/description&gt;'; $output .= '&lt;link&gt;www.site.com&lt;/link&gt;'; while ($row = mysql_fetch_array($result)) { //BODY OF RSS FEED $output .= '&lt;item&gt;'; $output .= "&lt;description&gt;" . htmlspecialchars($row['time']) . " " . htmlspecialchars($row['username']) . "&lt;/description&gt;"; $output .= '&lt;/item&gt; '; } //CLOSE RSS FEED $output .= '&lt;/channel&gt;'; $output .= '&lt;/rss&gt;'; //SEND COMPLETE RSS FEED TO BROWSER $filename = "timetable.xml"; if (!$handle = fopen($filename, 'w')) { echo "Cannot open file ($filename)"; exit; } // Write $somecontent to our opened file. if (fwrite($handle, $output) === FALSE) { echo "Cannot write to file ($filename)"; exit; } if (fwrite($handle, $total) === FALSE) { echo "Cannot write to file ($filename)"; exit; } echo "Success, wrote {$content}{$total} to file ($filename)"; fclose($handle); ?&gt; </code></pre> <p>This results in a .xml rss feed being created however everything is in it's own individual <code>&lt;item&gt;&lt;/item&gt;</code> and <code>&lt;description&gt;&lt;/description&gt;</code> which causes trouble. Is there a way to wrap <code>&lt;item&gt;&lt;discussion&gt;</code>ALL OF THE CONTENT<code>&lt;/discussion&gt;&lt;/item&gt;</code></p> <p>Thanks</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload