Logic-shreddingly impossible problems
Posted: Sat Feb 21, 2009 1:03 pm
At least, that's what my PHP is returning. This is the code I'm trying to execute:
And that while() goes on for a while(). Both the require_once's are files I've used before, and I've used a while() loop with mysql_fetch_assoc. $feeds is returning a valid MySQL Resource, which mysql_fetch_assoc is reading correctly.
But this is the error when I try running that code:
I've tried commenting out everything at the top, I've tried adding in numerous strings and variables and { and $ just to get a different error message, but it keeps coming back to that error.
Am I making some horrible mistake I'm not seeing? Because I'm really up against the wall here
Code: Select all
<?php
// Connect to DB
define('IN_SFR', 'YES');
include('dbconnect.php');
// Check for time since last run?
// No, we'll use MagpieRSS's builtin cache function instead
// We'll need this to parse feeds
require_once('magpierss/rss_fetch.inc'); // Magpie
// require_once('sanitize.inc');
$feeds = mysql_query("SELECT * FROM `feeds` WHERE `active` = '1'");
while ( $feed = mysql_fetch_assoc($feeds) )
{
$feed_url = $feed['feed_url'];
$rss = fetch_rss();
// Items FOREACH
foreach ($rss->items as $item) {
// Which feed is this coming from?
$todb_feedid = $feed['feedid'];
But this is the error when I try running that code:
Do you see the kicker? Line 21 is the blank space after fetch_rss();Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `'{'' or `'$'' in C:\wamp\www\arcane.co.za\SFR\feedfetcher.php on line 21
I've tried commenting out everything at the top, I've tried adding in numerous strings and variables and { and $ just to get a different error message, but it keeps coming back to that error.
Am I making some horrible mistake I'm not seeing? Because I'm really up against the wall here