Welcome Guest, Not a member yet? Register   Sign In
Basic - How do I read this array?
#1

[eluser]TerryT[/eluser]
I am retrieving data from a multi_select on a form using this:

Code:
$project_data = array('projects' => $this->input->post('projects'));

The xdebug shows the result as:

$project_data = array
projects = array
[0] = 2
[1] = 3
[5] = 5

2, 3 and 5 are the number of my projects from the multi_select. How do I step through the array and read the values 2, 3 and 5? The projects array could have any number of projects from 1 to 99 determined when the user makes the selection.

I know it should be simple, but I haven't been able to get it. Thanks.




Theme © iAndrew 2016 - Forum software by © MyBB