[PHP] How to Replace String in PHP

[PHP] How to Replace String in PHP

[PHP] How to Replace String in PHP - Hello developers, in this article will explained how to replace string in PHP. In PHP Programming, there is a special function to do it. This function is str_replace.

str_replace() function is has 3 parameters, it is str_replace(find, replace, object). For explample, look at below:

<?php
$object = My name is Aji;
$after_replace = str_replace("Aji", "Paper 4Share", $object);
echo $after_replace;
?>

and the output is
 My name is Paper 4Share

You need read this:




Paper 4Share - [PHP] How to Replace String in PHP

0 Response to "[PHP] How to Replace String in PHP"

Post a Comment