Non-abstract Method must contain body

Hello,

Im receiving a PHP error - Note I am using the code igniter frame work.

Non-abstract method Dealer_model::on_screen() must contain body in W:\www\s\system\application\models\dealer_model.php on line 84

I cant figure out what body is for this non-abstract method; please see method below.

Thank you

#--------------------------------------------------------------------------
# METHOD: On-screen display of array contents
#--------------------------------------------------------------------------
    function on_screen($var);
    {
        // on-screen display
        print ('<xmp>');
        print_r($var);
        print ('</xmp>');
        return;
    }

Open in new window

vrmetroAsked:
Who is Participating?
 
twocandlesConnect With a Mentor Commented:
You have an extra ';' after the function definition, and php is assuming it's an abstract method. Just remove it.
0
 
vrmetroAuthor Commented:
Nice!  Thanks
0
 
twocandlesCommented:
Glad to help and thanks for the points! :)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.