How can I take: $userarray
(which is an array and I know holds 3 values) and put them into 3 seperate variables instead of looping through. There seperated by
Yes, use the extract method.
From the docs:
"blue",
"size" => "medium",
"shape" => "sphere");
extract($var_array);
echo "$color, $size, $shape";
?>
The above example will output:
blue, large, sphere
Or do you want to glue your elements together? Then try implode:
$array = array('lastname', 'email', 'phone');
$comma_separated = implode(",", $array);
Will print:
"lastname, email, phone"