Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

Count occurances of something.

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Count occurances of something.

Postby reinheitphp » Mon Jul 28, 2003 10:02 pm

How could I count how many times a certain word, number, or character, etc. appears in a file?
I can open a file and read it and display the information or write to it etc.
But what would be the little snippet of php that would count how many times something I specify occurs?
reinheitphp
New php-forum User
New php-forum User
 
Posts: 12
Joined: Sun Jul 13, 2003 10:58 pm

Postby swirlee » Tue Jul 29, 2003 5:47 am

User avatar
swirlee
Moderator
Moderator
 
Posts: 2272
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back

Postby reinheitphp » Tue Jul 29, 2003 5:14 pm

Thanks. 8)
reinheitphp
New php-forum User
New php-forum User
 
Posts: 12
Joined: Sun Jul 13, 2003 10:58 pm


Return to PHP coding => General

Who is online

Users browsing this forum: Google [Bot] and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron