bonjour
article
http://mach13.com/how-to-get-a-variable-name-as-a-string-in-php
<?php
$tableau=array();
function var_name (&$iVar, &$aDefinedVars)
{
foreach ($aDefinedVars as $k=>$v)
$aDefinedVars_0[$k] = $v;
$iVarSave = $iVar;
$iVar =!$iVar;
$aDiffKeys = array_keys (array_diff_assoc ($aDefinedVars_0, $aDefinedVars));
$iVar = $iVarSave;
return $aDiffKeys[0];
}
$toto="titi";
echo $t0=var_name($toto,get_defined_vars());
$tableau[$t0]=$toto;
echo '<pre>';
print_r($tableau);
echo '</pre>';
?>

Bonne programmation !