Help with sum of items
| From: | Jim Greene | Date: | Thu, 20 Mar 2003 02:30:55 +0000 |
| Subject: | Help with sum of items | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-140384@lists.php.net to get a copy of this message | ||
Hi All,
I have the following for data:
03/14/2003,09:56:17,PTLD-TC1-HARC1,Stop,63.164.60.116,200,jsmith,9,24
3,271,15,User Request,2072280717,2073369937,46666BPS
03/15/2003,09:56:17,PTLD-TC1-HARC1,Stop,63.164.60.116,200,jsmith,9,24
3,271,15,User Request,2072280717,2073369937,46666BPS
03/16/2003,09:56:17,PTLD-TC1-HARC1,Stop,63.164.60.116,200,jsmith,9,24
3,271,15,User Request,2072280717,2073369937,46666BPS
03/17/2003,09:56:17,PTLD-TC1-HARC1,Stop,63.164.60.116,200,jwgreene,9,24
3,271,15,User Request,2072280717,2073369937,46666BPS
What I need to do is the following:
Take the value of a specific entry (15 in the above data) and add each
instance so I have a total of all the entries... I am assuming that I
would take the line, split it, assign each item to a variable and then I
would be able to do something with a while statement, but I am not
really sure what in php. Any help would be appreciated. Thanks
Jim