Support the ongoing development of Laravel.io →
posted 10 years ago
Input Forms
Last updated 2 years ago.
0

I don't think you can do it in one line in PHP 5.3.

$first_name = Input::get('first_name');
$employee->first_name = $first_name[$i];

Accessing arrays directly on return values from functions is one of those nifty new features added in PHP 5.4.
http://php.net/manual/en/migration54.new-features.php

Last updated 2 years ago.
0

It worked!

Thank you :)

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

and and Joined 3 Apr 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.