I am trying to simply call a class function and this error keeps on bugging me
syntax error, unexpected '$db' (T_VARIABLE), expecting function (T_FUNCTION)
database.php
<?php
class db
{
public static Somefunction($pr1, $pr2)
{
// SOME CODE HERE
}
}
?>
dtCall.php
<?php
require_once "database.php";
class database
{
$db = new db();
public function myFun()
{
$result = $db->Somefunction($pr1, $pr2);
}
}
?>