title: Laravel : Undefined offset:3?
body: <p>I get an error </p>
  
  <blockquote>
    <p>Undefined offset: 3</p>
  </blockquote>
  
  <p>What i want is in edit if $<code>view_360</code> and $<code>iframe_title</code> empty to find that iframe and delete it . Any suggestion how can i do that?</p>
  
  <pre><code>for ($i=0; $i &lt;= count($view_360); $i++) {
  
        if(!empty($view_360[$i])){
          if($request-&gt;view360_id[$i] == "undefined"){
            $view_360_iframe = new View360();
          }
          else {
           $view_360_iframe = View360::findOrFail($request-&gt;view360_id[$i]);
          }
          $view_360_iframe-&gt;property_id = $property-&gt;id;
          $view_360_iframe-&gt;title = $iframe_title[$i];
          $view_360_iframe-&gt;iframe = $view_360[$i];
          $view_360_iframe-&gt;save();
  
        }
        if(empty($view_360[$i]) &amp;&amp; empty($iframe_title[$i])){
            $view_360_iframe = View360::findOrFail($request-&gt;view360_id[$i]);
            $view_360_iframe-&gt;delete();
        }
      }
  </code></pre>