How to Fix/Clean Lambda warnings/errors from Views PHP I used views php to get the values from the field collection of the saved node in order to create a front end select list on views. 



It does what I wanted it to do but there are a bunch of warnings and notice and I would like to clean it.

This is just a part of the warning and notice that appeared.



And this:


It's a repetition of errors for my different variables.

This is an example of my code:

&lt;select class="number_of_person"&gt;

    &lt;?php
    $wrapper = entity_metadata_wrapper('node', $row-&gt;nid);
    if (isset($wrapper-&gt;field_criteria)) { 
    $prices_number_of_person= array();
    $min_and_max_number_of_person = array();
        foreach ($wrapper-&gt;field_criteria as $i){
              $price_loop1[] = $i-&gt;field_price-&gt;value();
              $min_and_max_loop1[] = $i-&gt;field_criteria_name-&gt;value();

        }
         $prices_number_of_person= implode(",", $price_loop1);
         $min_and_max_number_of_person = implode(",", $min_and_max_loop1 );


         $split_min_and_max_number_of_person = explode(",", $min_and_max_number_of_person );
         $split_prices_number_of_person = explode(",", $prices_number_of_person);

         $length_number_of_person = count($split_min_and_max_number_of_person);


        for ($number_of_person=0; $number_of_person &lt; $length_number_of_person; $number_of_person++) {

        if($split_prices_number_of_person[$number_of_person] !="" ){
         echo '&lt;option value="'.$split_prices_number_of_person[$number_of_person].'" class="options"&gt;'.$split_min_and_max_number_of_person[$number_of_person].'... + ₱ '.$split_prices_number_of_person[$number_of_person].'&lt;/option&gt;';
        }

         else{
          echo '&lt;option value="'.$split_prices_number_of_person[$number_of_person].'" class="options"&gt;'.$split_min_and_max_number_of_person[$number_of_person].'&lt;/option&gt;';

              }
         }

     }
    ?&gt;

    &lt;/select&gt;


I was wondering if there is something that I need to add to my code to get rid of the warning and notice?

Thank you in advance!
Before try to explode/implode  check that data exist in them 
as example  

"$price_loop1"   
 if($price_loop1) 
     $prices_number_of_person= implode(",", $price_loop1);


and for explode

  if($prices_number_of_person)
      $split_prices_number_of_person = explode(",", $prices_number_of_person);