Count occurances of something.

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

reinheitphp
New php-forum User
New php-forum User
Posts: 12
Joined: Sun Jul 13, 2003 10:58 pm
Contact:

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?

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

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


reinheitphp
New php-forum User
New php-forum User
Posts: 12
Joined: Sun Jul 13, 2003 10:58 pm
Contact:

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

Thanks. 8)


Return to “PHP coding => General”

Who is online

Users browsing this forum: No registered users and 4 guests