
July 3rd, 2012, 01:52 PM
|
|
|
FishMonger has told you a lot about what's wrong.
Just an additional note:
Code:
for($i=1; $i eq $array_size; $i++)
This is wrong. $i and $array_size are numerical values, they should be compared with == not with eq, which is for comparing strings.
So if you really want yo use the C-style loop (which I do not recommend), it should be:
Code:
for($i=1; $i == $array_size; $i++)
Having said that, a for or foreach loop such as the one suggested by FishMonger is much better.
|