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

please help
HTML Code:

Code: <span id="ctl00"><span>

how do i display data on a page from mysql
1 - do i use this code at the top of each of my page i wish to only alow access if there as been a s

DATEDIFF Question
First time post, and of course it is a help question.

I am using a WP plug-in to display prev

Checkbox info wont include in Mailto
Hey, im new to php.
Basically I have made a form to request which type of job(s) are needed, whic

Month String to Numeric?
Hi guys,

Given a month as a string, is there a simple way to find the numeric representation

records between 2 dates
Hello all,

I have a date tracked table which contains effective_start_date and effective

Basic Question about Threading and PHP...
I have a page that I am working on and it is taking several hours to process. The basics of what th

get font info from a font file
hello,

Does anyone know how to get font info from a font file ... using php of course !
<

help with multi-update
Now sure how to ask this really....
10g database if that matters.

I have a customer

Can you help please? Php file
I have to write this php file to allow users to register their nicknames on nickserv

For an I

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