Hi,
Here is an example of how you can do it
This example searches for the letter h. If at least 2 occurences of the caracter 'h' occures it gives you true else false:
The code
<?
$string = hhhi;
$string1 = hihihih;
if (ereg("h{2,}",$string)) {
echo "The first string has at least 2 h's<br>";
} else {
echo "String: false<br>";
}
if (ereg("h{2,}",$string1)) {
echo "The second string has at least 2 h's<br>";
} else {
echo "String1: false<br>";
}
?>
Hope this helps you out