Hi. 🙂
I'm currently have this for loop:
for($i = 0; ($i < count($items)); $i++)
{
$type_count = ($items[$i]['item_type'] == '7') ? ($type_count + 1) : $type_count;
}
What I need to achieve from it is for it to count up the $type_count (if it is == 7 only) during each loop and then once it has reached the last loop store the total figure in a variable to use later in the script.
Obviously, what I have above is incorrect but I hope it shows roughly what I'm trying to achieve.
Many thanks in advance for any help. 🙂