<?php
$nome = "php è un gran bel linguaggio";
$num = substr_count($nome, "l");
echo $num; //restituisce 2
?>