Welcome Guest, Not a member yet? Register   Sign In
Adding html Around a Table Column
#2

[eluser]Aken[/eluser]
$row becomes a new variable that is only available during that iteration. In order to change the original array item, you must define it as a reference.
Code:
foreach ($query->result_array() as &$row) { ...

http://php.net/manual/en/language.references.php


Messages In This Thread
Adding html Around a Table Column - by El Forum - 07-20-2011, 02:24 PM
Adding html Around a Table Column - by El Forum - 07-20-2011, 02:31 PM
Adding html Around a Table Column - by El Forum - 07-20-2011, 06:35 PM
Adding html Around a Table Column - by El Forum - 07-21-2011, 06:39 AM
Adding html Around a Table Column - by El Forum - 07-21-2011, 09:08 AM
Adding html Around a Table Column - by El Forum - 07-21-2011, 09:32 AM
Adding html Around a Table Column - by El Forum - 07-21-2011, 09:38 AM



Theme © iAndrew 2016 - Forum software by © MyBB