Not just spaces, but any other letter, for example.
Is there a function that returns this to me?
I've tried:
public function verifica_nome()
{
return substr_count($this->name, " ");
}
But the same always returns me 0 ...
Not just spaces, but any other letter, for example.
Is there a function that returns this to me?
I've tried:
public function verifica_nome()
{
return substr_count($this->name, " ");
}
But the same always returns me 0 ...
Use this php function that returns an integer with the quantity: link
echo substr_count("oi tudo bem?"," ");
It will show:
2