in realtà puoi fare così:

Codice PHP:
$nome "grano";
$totgrano 15;
$varname "tot".$nome;
echo $
$varname