PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
Jay87
Forum Commoner
Posts: 61 Joined: Thu Jan 07, 2010 5:22 am
Post
by Jay87 » Mon Jan 18, 2010 5:30 am
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:
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..!
Jay87
Forum Commoner
Posts: 61 Joined: Thu Jan 07, 2010 5:22 am
Post
by Jay87 » Mon Jan 18, 2010 7:19 am
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?