number of occurences

From: Date: Thu, 01 Jan 1970 00:00:00 +0000
Subject: number of occurences
Groups: php.db 
Request: Send a blank email to php-db+get-9787@lists.php.net to get a copy of this message
Hi, I have a long number which I get out of a database. $number = 123782301247832; Now, I'd like to check how many times the letter 1 occurs in there... $occured = check_occurance(1,$number); $occured would now return "2" or somehow like that... is there a predefined function for that and if not, how do I go about creating my own? Thanks in advance, Raphael Pirker raphaelp@nr1webresource.com

« previous php.db (#9787) next »