I would like to store value from while loop but not in multidimensional way :
$movies_id = array();
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
$id = $row['id'];
$title_id = $row['title_id'];
$movies_id[] = [$id => $title_id];
}
print_r($movies_id);
I am not getting the way, how to do it, if i just write $movies_id = [$id => $title_id]; it only shows the last value.
Thank you by advance.