xara: Count-Match-?

Beitrag lesen

hallo,

<?
$string = "Ich möchte wissen wie oft ich das wort ich diesem string habe";

$check = "ich";

#funktion?

return = 3

?>

wie mache ich das? ;)

  • Groß und klein egal

noch ein bsp:
<?
$string = "12345678912345678";

$check = "9";

#funktion?

return = 1

?>

Danke!!