[Resolved]Call to undefined function Help
Hello need a little help I keep getting an error "Fatal error: Call to undefined function rating_avg()"
The function is in rating.php
PHP Code:
<?php
function rating_avg($id)
{
//sample code
$A = $id;
$B = "rating ";
$C = $A + $B;
return $C;
}
?>
The call page
PHP Code:
<?php require('rating.php');//header
echo rating_avg($RPID);
?>
Re: Call to undefined function Help
try using include() instead.
Re: Call to undefined function Help
Yea tried that too as well still same thing
Re: Call to undefined function Help
I cannot see any reason why that code should not work. Can you zip up your files and attach them here?