Jump to content

What is this syntax error?


billy_111

Recommended Posts

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

 

 

Link to comment
https://forums.phpfreaks.com/topic/205706-what-is-this-syntax-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.