OOP PHP simple question
- by Tristan
Hello,
I'm new to OOP in PHP, is that to seems correct ?
class whatever {
    Function Maths() {
    $this->sql->query($requete);
   $i = 0;
  while($val = mysql_fetch_array($this)) { 
    $tab[i][average] = $val['average'];
    $tab[i][randomData] = $val['sum'];
    $i=$i+1;
    }
        return $tab;
}
I want to access the data contained in the array
$foo = new whatever();
$foo->Maths();
 for ($i, $i <= endOfTheArray; i++) {
    echo Maths->tab[i][average];
    echo Maths->tab[i][randomData];
 }
Thank you ;)