I am using the following code to capture the first letter of each word. How can I add another rule in preg_split
to ignore words such as:
$nome = preg_split("/[\s,_-]+/", $loja->nome);
$iniciais = "";
foreach($nome as $n)
$iniciais .= $n[0];
echo $iniciais;