• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.