Page 1 of 1

Counter?

Posted: Mon Jan 18, 2010 5:30 am
by Jay87
Here is my current code

Code: Select all

 
<table width=100% height=66% cellspacing=1 cellpadding=0 class=smooth>          
<tr><th colspan=8 style='text-align:center;background:red;font-size:30px;'><a href='firstline.php?Priority=High' style=color:white;><?echo"Priority"?></th><th colspan=8 style='text-align:center;background:orange;font-size:30px;'><a href='firstline.php?statfilter=Open Calls&&queuefilter=1st Line Support' style=color:white;><?echo"Routine"?></th></tr>
<tr><th colspan=8 style='text-align:center;background:green;font-size:30px;'><a href='workshop.php?statfilter=Open Calls&&queuefilter=Cedar' style=color:white;><?echo"Workshop"?></th><th colspan=8 style='text-align:center;background:blue;font-size:30px;'><a href='support_visit.php' style=color:white;><?echo"Work Req"?></th></tr>
            
</table>
 
this shows:

Image

basically i want to add a counter next to the text

i.e. In the workshop box i want it to count all the calls in: workshop.php?statfilter=Open Calls&&queuefilter=Cedar


Any help would be greatly appreciated..!

Re: Counter?

Posted: Mon Jan 18, 2010 7:19 am
by Jay87
I've played around with it abit and ended up creating a function:

Code: Select all

            function CountWorkshop ()
        {
                $WorkshopCount = array("[color=#FF0000]workshop.php?statfilter=Open Calls&&queuefilter=Cedar[/color]");
                $result = count($WorkshopCount);
                
                echo $result;
        }   
The bit in red is where it falls downs as when i call the function it just returns 1, so i think it is just counting the page. Instead i want it to count the no. of items on the page (this could be done by counting the no. of call id's on the page) but i am not sure how to do this?

Any help plz? :)