phpeter Posted October 8, 2010 Share Posted October 8, 2010 I'm getting this error: PHP Parse error: syntax error, unexpected ';' in [...] on line 44 This is line 44: $file_string .= ($article_id == count($xml->channel->item) ? '<a>></a>' : '<a href="#' . $article_id-1 . '">></a>'; EDIT: Nevermind, I found it! The parenthesis at the end, duh. Quote Link to comment Share on other sites More sharing options...
marcus Posted October 8, 2010 Share Posted October 8, 2010 You need to surround your math with parenthesis, and you're missing a parenthesis to end your conditional statement. $file_string .= ($article_id == count($xml->channel->item)) ? '<a>></a>' : '<a href="#' . ($article_id-1) . '">></a>'; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.