the problem with str_replace


Posted on 16th Feb 2014 07:03 pm by admin

$str="hahahahahahahahahahahahahaha";
$nn=1;
$str=str_replace('ha','MyGod',$str,$nn);


echo $str;

the result is MyGodMyGodMyGodMyGodMyGodMyGodMyGodMyGodMyGodMyGodMyGodMyGodMyGodMyGod

Why $nn has no effect?the version of my php?

No comments posted yet

Your Answer:

Login to answer
206 Like 45 Dislike
Previous forums Next forums
Other forums

split string
Hi all

i have some names (imploded by comma):
Code: toronto,paris,madrid
Now, i would

how to insert value
I am having file bookissueadd.php..... in which i am having tag

<td height="21&q

Linking with Foreign Keys
I have been getting an erro when I try and link:

create table Faculty_Specialty (I_Name v

Wrong Info sent Using $get in form
Hi i have this code that i tried to make to send some info from one page to aother with lots of ppls

Find occurences of unicode characters in string
I need to prohibit filenames with everything but English characters and numbers but regexp and strin

error reporting
hey everyone

I have a production server in which I want error reporting but only on some page

how to get different value in second view of webdynpro?
hello guys,

In ABAP webdynpro I am trying to create one application having two views.

Undefined Variable: PHP_SELF, pls help
Hi,

Im a newbie on PHP / MySQL programming and Im running a script to search one field on my

Regarding accessing SQL query issued by any user in Oracle 10g
Hi all,
i want to know the queries issued by various users accessing a database...

dynamic table with forms
I have a table that is populated with mysql data and in teh first column there is a raido button tha

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash