Undefined Offset Error

Posted 1 year ago by JokersMild85

No idea why I am getting this error, can anyone provide some guidance?

public function store(Request $request)
    $values = $request->all();
    $id = Auth::id();
    echo "<h2>User ID: ".$id."</h2>";
        $e_id = $values['e_id'][$i];
        echo "<h4>Exercise ID: ".$e_id."</h4>";
        $sets = $values['sets'][$i];
        echo "<h4>Sets: ".$sets."</h4>";
        $reps = $values['reps'][$i];
        echo "<h4>Reps: ".$reps."</h4>";


Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up


Reply to

Use Markdown with GitHub-flavored code blocks.