Answers for "relace string in php"

PHP
1

php replace string

<?php 
  $string = "Hello PHP";
  $replace = str_replace("PHP", "JS", $string);
  echo $replace; // Hello JS
?>
Posted by: Guest on June-18-2021
8

php replace string within string

$new_string = str_replace( $take_out, $put_in, $string);
Posted by: Guest on August-18-2020

Browse Popular Code Answers by Language