se nella funzione verrei assegnare un variabile invece del nome della tabella e un filtro

cosa devo fare???

public function stampa_misura($tb,$filtro) {

$sqlgomme = "SELECT * FROM $tb where $filtro";


ecc

facendo cosi non funziona


require_once('sessioni.php');
class gomme {

// property
public $misura;

// construct
function __construct() {
$this->misura = '';
}

// method
public function stampa_misura($tb,$filtro) {

$sqlgomme = "SELECT * FROM $tb where $filtro";
$resgomme = mysql_query($sqlgomme) or die("Impossibile caricare i file: ".mysql_error());

while($righe = mysql_fetch_array($resgomme))
{
echo $misura[] = $righe[1]."
";
}
return $misura;
}
}

$object = new gomme();
$object->stampa_misura();