I have a table named profile
like this
S/N Name Age (VALUES) (1, Julius, 5 ) (2, Mark, 7) (3, Ismael, 9)
I want to display a result that will fetch the name row and separate the values with comma, e.g.
$result = Julius, Mark, Isamel
I used
$resuk = mysqli_query($conn, "SELECT GROUP_CONCAT(Name) FROM profile;");
$get_info = mysqli_fetch_assoc($resuk);
$values = explode(",", $get_info);
echo $values;
This gave me below error
Warning: explode() expects parameter 2 to be string, array given in C:\xampp\htdocs\dowel\commasep.php on line
I would appreciate if someone can assist. Thanks.