Php

What is str_replace()

str_replace()

Definition-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 searched.
for examlpe:-
<?php
echo str_replace(“amit”,”daniel”,”hello  amit”);
?>

Output:-     hello daniel

str-relc

Click to comment

Leave a Reply

Your email address will not be published. Required fields are marked *

The Latest

To Top