Is it somehow possible to store mySql data in an array without having to use a while
loop in php?
I only have 1 column here.
$members = $conn->prepare(Select id from members where state = 'CA');
$members->execute();
//Result ->1, 2, 3, 4, 5, 6, 7, 8, 9
//$myarray = array of the above results.
$myarray = array(1, 2, 3, 4, 5, 6, 7, 8, 9)//Has to be this kind of array.
I’m trying to avoid another while loop here, since this thing goes inside some more code.