Advertisement
ph4x35ccb

replace

Mar 10th, 2020
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.36 KB | None | 0 0
  1. $a="ajdkhhkd-1";
  2. $b="ajdkhhkd-2";
  3. $c="ajdkhhkd-3";
  4. $d="ajdkhhkd-4";
  5. $e="ajdkhhkd-5";
  6.  
  7. $arr = array($a,$b,$c,$d,$e);
  8.  
  9. $log = '';
  10. foreach ($arr as $texto) {
  11.     $log = $log . $texto."<br>";
  12. }
  13.  
  14. $modelo = file_get_contents('api.html');
  15. $modelo = str_replace('{LOG}', $log, $modelo);
  16. $modelo = str_replace('{TITULO}', 'Teste de modelo', $modelo);
  17.  
  18. echo $modelo;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement