RE: [PHP] grab a number
| From: | Maxim Maletsky | Date: | Sun, 21 Apr 2002 05:12:52 +0000 |
| Subject: | RE: [PHP] grab a number | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-93868@lists.php.net to get a copy of this message | ||
Try by doing something like:
$line = explode("\n", $text);
for($l=0; $l<sizeof($line); $l++) {
$data = explode("\t", $line[$l]); // was the TAB delimiter
for($d=0; $d<sizeof($data); $d++) { // see if you can avoid
sizeof
if($data[0] == date("format_bla_bla")) { // this
is if today
$number = $data[2];
Break;
}
}
}
Would this work for you?
If not then this is a suggestion :-)
Sincerely,
Maxim Maletsky
Founder, Chief Developer
maxim@phpbeginner.com
PHPBeginner.com (Where PHP Begins)
www.phpbeginner.com
> -----Original Message-----
> From: Craig Westerman [mailto:westerman@chanuteks.com]
> Sent: Sunday, April 21, 2002 2:05 AM
> To: php-general-list
> Subject: [PHP] grab a number
>
> I get the following report from Analog.
>
> Daily Report
> (Go To: Top: Monthly Report: Daily Report: Request Report)
> This report lists the activity in each day.
> Each unit () represents 3,000 requests for pages or part thereof.
> date: reqs: pages:
> ---------: -------: -------:
> 10/Mar/02: 1109810: 159291:
> 11/Mar/02: 1163018: 185106:
>
> Dates removed
>
> 18/Apr/02: 1197460: 190362:
> 19/Apr/02: 1175128: 181756: <<< Need to grab this number daily
> 20/Apr/02: 188: 142:
>
> Busiest day: 5/Feb/02 (130,779 requests for pages).
>
> ---------------------------------------------------
>
> I need to grab the 19/Apr/02 count of 181756. But the date will change
> daily. So it would need to always grab last number from second to last
line.
>
> Any suggestions?
>
> Thanks
>
> Craig ><>
> westerman@chanuteks.com
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php