This is my code:
$recommendations_name_list = explode(',',$result[$x]["recommendations_title"]);
$recommendations_vote_average = explode(',',$result[$x]["recommendations_vote_average"]);
foreach( $recommendations_name_list as $index => $recommendations_title ) {
           echo'<p>'.$recommendations_title.'</p>
                <p>'.$recommendations_vote_average[$index].'</p>';
}
Now, If in the  9th loop$recommendations_title have some value but  $recommendations_vote_average[$index] do not have a value. Then I get this error:
Notice: Undefined offset: 9
 
    