Q:

How to combine array of arrays in php to a single array string?

I fetch a column value during a query, I store each row value in an array:
while($stmt->fetch()){
    $category_array[]=array($category);
}

The result looks like this in the console:
category_array: Array(3)
0: ["Automotive Care"]
1: ["Automotive Care"]
2: ["Digital Service"]

I am trying to combine these into a single array that looks like:
["Automotive Care","Automotive Care","Digital Service"]

This array may have more than these results. So it has to be able to process whatever comes its way.
I am unable to find the right PHP function that allows me to do this. Which function should I use?
thanks!

A:

Simply change the code to remove the unnecessary array()
while($stmt->fetch()){
    $category_array[] = $category;
}

