billy_111 Posted June 24, 2010 Share Posted June 24, 2010 Hey, I have the following class: <?php class Gallery{ public function selectGalleryCategories(){ $sql = "SELECT * FROM tbl_gallerycategories"; $result = mysql_query($sql); return $result; } } When i try using "include('classes/Galleries.class.php');" i get an error: Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /homepages/27/d208312252/htdocs/fusion/admin/classes/Galleries.class.php on line 5 Line 5 is this: public function selectGalleryCategories(){ Any idea what the problem is? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/205706-what-is-this-syntax-error/ Share on other sites More sharing options...
PFMaBiSmAd Posted June 24, 2010 Share Posted June 24, 2010 You are using php5 syntax on a php4 system. It is time to upgrade your php version. The end of life and end of support of php4 was over 2-1/2 years ago. Quote Link to comment https://forums.phpfreaks.com/topic/205706-what-is-this-syntax-error/#findComment-1076363 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.