Is there any way to create a loop of variables inside list()
I've tried this code but it doesn't work.
$long_string = "one , two , three , four";
$list = explode(" , ",$long_string);
$count_list = count($list);
list(for($i = 0; $i <= $count_list; $i++){ return ${"list$i"}; }) = explode(" , ",$long_string);
Update : Got the solution, thanks