如何使用PHP获取数组的名称? [关闭]

I'm making a page about dict. I need to write a loop to foreach them. For showing the each title, i need to get the array's name. (each title's name just is the array's name)

i have a array here :

$a = array('num1', 'num2'); 
$b = array('num1', 'num2');
$c = array('num1', 'num2'); 
$z = array('num1', 'num2');

how to get its name a,b,c,z?

You can do an array:

$arrays = array(
   'a' => $a, 
   'b' => $b,
   'c' => $c,
   'd' => $d
);

and with a foreach you access their names:

foreach($arrays as $array_name => $array) {
   ...
}