I have a 2-d array as shown below :-
$variables = array(
"firstname" => "Sachin",
"lastname" => "Tendulkar",
"course" => array(
0 => "PHP",
1 => "HTML",
2 => "CSS",
3 => "Javascript"
)
);
I want to implode the "$variables" array and get only the list of values present in "course" in a variable separated by comma. Is it possible using array_column() ? Something like this is not working :-
$string = implode("," , array_column($variables,'course');
echo $string; //gives no output
var_dump($string); //gives string '' (length=0)