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?

206 Like 45 Dislike
Previous php-forum Next php-forum
Other php-forum

Displaying data from database into a 2 dimensional table
Good day!

I'm a beginner in PHP and I'm not expecting a full coding for this qestion. I'm jus

delete comma
HI,

How to delete "," at the end of the string.
Code: $match = 2009/02/03/a2corr

How to secure my login data to my database?
Hi there,

It may be a stupid question but I don't know how to secure my login data to my data

Trouble with a select list
Hello All!
I was wondering if any of you guys could help me with a small problem I'm having!

Can't shake the "Warning: include()" error
I've just uploaded my site to a new server and where I have PHP include tags in my HTML, the browser

Date help - fetch dates for Mondays between xxx and yyy?
Does anyone know the best way to do this? I have two dates, say:

2010-01-26 and 2010-05-30

mysql select with $_get ?
Hi, i have this code:
Code: // If char id is 0 and character dont exist do:
if ($_GET["id

Pagination
Hi All,

I think I'm finally getting somewhere with pagination!

I can now submit a quer

Passing Variables
What I'm wanting to do is when the user clicks on Arenas it will know the name of the country it's w

php libs/ browsercap.in
ok i have a host that refuses to stay current. they control my php settings and libs. is there a way

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