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)) {
I may have misunderstood what you're aiming for, but this might do it:
replace
$movies_id[] = [$id => $title_id];
with
$movies_id[$id] = $title_id;