How to assign a list of variable values from an array in PHP

1 Answer

0 votes
$array = ["PHP", "Java", "Python", "C#"];

list($a, $b, $c, $d) = $array;

echo $a . " " . $b . " " . $c . " " . $d;
 
  
/*
run:
   
PHP Java Python C# 
   
*/

 



answered Oct 6, 2017 by avibootz

Related questions

...