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)) {
Instead of this line
$movies_id[] = [$id => $title_id];
Use the following
$movies_id[$id] = $title_id;