Welcome Guest, Not a member yet? Register   Sign In
Multidimensional array read-out in view
#2

[eluser]Michael Wales[/eluser]
CI automatically brings the var array to the top level - I've never dove into the code to see why. So, you should be able to loop through those arrays like so:

Code:
foreach ($0 as $key => $val) {
  echo $key . ": " . $val;
}

foreach ($1 as $key => $val) {
  echo $key . ": " . $val;
}

If that doesn't work for you just change $0 and $1 to $vars[0] and $vars[1], respectively.


Messages In This Thread
Multidimensional array read-out in view - by El Forum - 08-11-2007, 07:20 PM
Multidimensional array read-out in view - by El Forum - 08-12-2007, 01:20 AM
Multidimensional array read-out in view - by El Forum - 08-12-2007, 03:56 AM



Theme © iAndrew 2016 - Forum software by © MyBB