There are any way to convert a PDO fetch (only 1 column) in a PHP array? Instead of a foreach loop. Example:
"data": [
{
"A": "1"
},
{
"A": "2"
},
{
"A": "3"
}
]
expected:
"data": [
"1",
"2",
"3"
]