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. Link to comment https://forums.phpfreaks.com/topic/215390-unexpected-semicolon-error-anyone-know-why/ 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>'; Link to comment https://forums.phpfreaks.com/topic/215390-unexpected-semicolon-error-anyone-know-why/#findComment-1120063 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.