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
[EMAIL PROTECTED]
PHPBeginner.com (Where PHP Begins)
www.phpbeginner.com
> -----Original Message-----
> From: Craig Westerman [mailto:[EMAIL PROTECTED]]
> 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 ><>
> [EMAIL PROTECTED]
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php