I need to insert variable content (which is a list of variables name) into list(). In the example below, I want the 3rd line to be like this: list($color, $power, $item1,$item2) = $info;
HOw can I do this?
- Code: Select all
$info = array('brown', 'caffeine', 'hockey', 'football');
$sport = '$item1,$item2';
list($color, $power, $sport) = $info;
Thanks for your help,
Luc

