Sunday 27 July 2014

Filled Under:

st_ireplace() in php

 str_ireplace() Function:

                                       str_ireplace() function that is use to replace some character of string from other character it is case insensitive if we use str_replace() function the it have the same functionality but it is case sensitive.

Syntax:

          str_ireplace(finding character, replacement character, string, count);finding character(optional) :find the character that we want to replace
replacement character(optional): the specific character that replace form finding value
count(optional): it count that how many time character is replace

Example:

 <?php 
$str= “hello php”;
echo str_ireplace(“php”,”umer”,$str);
?>

  Output:

               hello umer    




0 comments:

Post a Comment