counting occurences in a string

From: Date: Mon, 16 Oct 2000 13:27:27 +0000
Subject: counting occurences in a string
Groups: php.general 
Request: Send a blank email to php-general+get-20365@lists.php.net to get a copy of this message
How can I count the number of occurences of some character (or characters) in a string? I have an article in a mySQL database and want to count the number of paragraphs. Counting the "<P>" tags should help, but how do I do that? Is it possible also to know their position in the string (the nth position) as well? kind regards, bill

« previous php.general (#20365) next »