fork(2) download
  1. <?php
  2.  
  3. $nome = preg_split("/((de|da|do|dos|das)?)[\s,_-]+/", "A C Loja do Supermercado");
  4. $iniciais = "";
  5. foreach($nome as $n)
  6. {
  7. if (strlen($n) > 0)
  8. {
  9. $iniciais .= $n[0];
  10. }
  11. }
  12.  
  13. echo $iniciais;
Success #stdin #stdout 0.02s 23636KB
stdin
Standard input is empty
stdout
ACLS