![]() |
if within a foreach ?
Hi,
I'm not sure of the best way to do this and thought I might get a bit of help here ... hopefully :) I have the contents of an array being fed out using a foreach loop, this works just fine and it displays everything as I would like. What I was hoping to achieve however is that whenever X value appears within the array, I want it to count up on a variable. So something like: PHP Code:
|
This is perfectly valid, except that you forgot the ";" marks:
php Code:
|
Ah, thanks, silly mistake :)
|
| All times are GMT. The time now is 10:58 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0