Im a bit stuck, I am able to read each row into an array but it is an associative array but I don't want that, i want a normal array ( array = ['2', '3', '4'] )
also, my table only has 1 column, so it should be easier
here is my code.
var_dump
gives me :
array(3) { [0]=> array(1) { [0]=> string(44)
"0Av5k2xcMXwlmdEV6NXRZZnJXS2s4T3pSNzViREN6dHc" } [1]=> array(1) { [0]=> string(44)
"0Av5k2xcMXwlmdDhTV2NxbXpqTmFyTUNxS0VkalZTSnc" } [2]=> array(1) { [0]=> string(44)
"0Av5k2xcMXwlmdDdhdVpMenBTZTltY2VwSXE0NnNmWWc" } }
which tells me it is an assosiative array?
$fileList = getLiveList();
var_dump($fileList);
function getLiveList(){
$query = "SELECT id FROM livelist";
$result = mysql_query($query); // This line executes the MySQL query that you typed above
$array = []; // make a new array to hold all your data
$index = 0;
while($row = mysql_fetch_row($result)) // loop to give you the data in an associative array so you can use it however.
{
$array[$index] = $row;
$index++;
}
return $array;
}