SyntaxFix
Write A Post
Hire A Developer
Questions
You should really use for() instead of foreach() in this case.
for()
foreach()