fork download
  1. <?php
  2.  
  3. $mensagem = '{{nome}} Lorem Ipsum is simply text of the printing and typesetting industry {{email}}';
  4. $nome = 'Maria';
  5. $email = 'Maria@foo.bar';
  6.  
  7. $traducao = array("{{nome}}" => $nome,
  8. "{{email}}" => $email,
  9. );
  10.  
  11. echo strtr($mensagem, $traducao);
Success #stdin #stdout 0.02s 24448KB
stdin
Standard input is empty
stdout
Maria Lorem Ipsum is simply text of the printing and typesetting industry Maria@foo.bar