Re: [PHP] Count lines or chars

2003-10-17 Thread Pavel Jartsev
Markus wrote: Hi PHP-gurus :-) I'd like to count the lines within a file and store the result within a variable. Every line begins with the char %. Would it be easier to count these chars and how could I do that? Thanks for your help. markus Maybe this way: $file = file( '/some/file.ext' ); $lines

RE: [PHP] Count lines or chars

2003-10-17 Thread Morten Skou
I guess you could do something like : That would count all the lines in the file. /Morten -Original Message- From: Markus [mailto:[EMAIL PROTECTED] Sent: 17. oktober 2003 11:25 To: [EMAIL PROTECTED] Subject: [PHP] Count lines or chars Hi PHP-gurus :-) I'd like to count the

[PHP] Count lines or chars

2003-10-17 Thread Markus
Hi PHP-gurus :-) I'd like to count the lines within a file and store the result within a variable. Every line begins with the char %. Would it be easier to count these chars and how could I do that? Thanks for your help. markus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, vis