So I'm doing a project with the word 'Dog' that looks in the test file .. if you have 4 'Dog' it's the result, if not ==> (Dog) Does not exist or has less than 3 words in the test .txt but I'm not able to put '3' greater than 3
project structure
<?php
$arquivo = strtolower(file_get_contents('teste.txt'));
$textoBuscar = strtolower('Cachorro');
if(strpos($arquivo, $textoBuscar )!== FALSE){
echo '<h1>mais de 3 palavras ((Cachorro)) no teste.txt< /h1>';
} else {
echo '<h1>(Cachorro) Não Existe ou tem menos de 1 palavra no teste.txt< /h1>';
}
?>