0

I tried everything to get this code below to work with codeigniter.

$arrival_date = $_POST['arrival_date'][$re_id]

Here's what I do it in codeigniter:

$arrival_date = $this->input->post('arrival_date'[$re_id]);
$arrival_date = $this->input->post('arrival_date')[$re_id];
$arrival_date = $this->input->post('arrival_date[$re_id]');

All the above three code failed.

Anyone know how to do this in codeigniter?

1 Answer 1

2
$x = $this->input->post('arrival_date');
$arrival_date = $x[$re_id];

If your array in the form looks like name="arrival_date[re_id]", then

$arrival_date = $x['re_id'];

I could help more if you would show the form too.

Sign up to request clarification or add additional context in comments.

3 Comments

this seems to work fine. if I show you the form, is there a better way? I think your code works okay.
If it works, then there is no reason to show it, try providing more information next time, this was just a lucky guess.
well, i think the info i have is enough since you have answered it correctly...:). thanks man...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.