top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is str_replace() function in PHP?

0 votes
302 views
What is str_replace() function in PHP?
posted Jun 5, 2014 by Amanpreet Kaur

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

This function replace some characters with some other characters in a string , this function is case sensitive.

 syntax:- str_replace(find,replace,string);

 find:-required,specifies the value to find.
 replace:-required,specifies the value to replace the value in find.
 string:-required,specifies the string to be searched.

 for examlpe:- 

         <?php

               echo str_replace("world","india","hi world");

             ?>

 output:-     hi india
answer Jun 6, 2014 by Karamjeet Singh
...