getFavoriteMovies($i)); $i++; } while ($i <= $ac->nb_pages_movies); print_r($notes); file_put_contents('backup_movies.json', json_encode($notes)); ?>