Welcome Guest, Not a member yet? Register   Sign In
Why is foreach not working?
#15

[eluser]Aken[/eluser]
What do you mean each character? What are you trying to accomplish in the first place? result_array() returns an array of arrays. It should be structured something like this:

Code:
Array (
  0 => Array (
    'id' => 3,
    'column' => 'value',
    'col2' => 'value2',
  ),
  1 => Array (
    'id' => 16,
    'column' => 'value',
    'col2' => 'value2',
  )
  // Etc...
)

Obviously the actual data will depend on your DB and query, but that's what result_array() sends. I don't get what you're trying to do, because so far you're just creating a single string. Again, I highly suggest learning the basics, because you're trying to use a framework without knowing the language it's written in.


Messages In This Thread
Why is foreach not working? - by El Forum - 08-16-2012, 05:53 PM
Why is foreach not working? - by El Forum - 08-16-2012, 05:59 PM
Why is foreach not working? - by El Forum - 08-16-2012, 06:05 PM
Why is foreach not working? - by El Forum - 08-16-2012, 06:08 PM
Why is foreach not working? - by El Forum - 08-16-2012, 06:22 PM
Why is foreach not working? - by El Forum - 08-16-2012, 06:36 PM
Why is foreach not working? - by El Forum - 08-16-2012, 06:45 PM
Why is foreach not working? - by El Forum - 08-16-2012, 06:51 PM
Why is foreach not working? - by El Forum - 08-16-2012, 06:59 PM
Why is foreach not working? - by El Forum - 08-16-2012, 07:07 PM
Why is foreach not working? - by El Forum - 08-16-2012, 07:11 PM
Why is foreach not working? - by El Forum - 08-16-2012, 07:15 PM
Why is foreach not working? - by El Forum - 08-16-2012, 07:22 PM
Why is foreach not working? - by El Forum - 08-16-2012, 07:34 PM
Why is foreach not working? - by El Forum - 08-16-2012, 09:23 PM
Why is foreach not working? - by El Forum - 08-16-2012, 10:12 PM



Theme © iAndrew 2016 - Forum software by © MyBB