I want to loop through the result set of the following query:
\"select uid from userbase\"
I am currently employing the following loop, but
You need to define a array and store your data into array inside loop .
Use MYSQLI_ASSOC
no need for incremented value
$deviceToken=array();
while ($row = $output->fetch_array(MYSQLI_ASSOC)) {
$deviceToken[] = $row['uid'];
}
print_r($deviceToken);
for($i=0;$i<=count($deviceToken);$i++){
echo $deviceToken[$i];
}