PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Tue Jul 07, 2020 1:41 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 14 posts ] 
Author Message
PostPosted: Wed Dec 03, 2008 9:14 am 
Offline
Forum Contributor

Joined: Wed Nov 05, 2008 1:06 am
Posts: 153


Top
 Profile  
 
PostPosted: Wed Dec 03, 2008 10:22 am 
Offline
Forum Contributor

Joined: Wed Nov 19, 2008 7:23 am
Posts: 153


Top
 Profile  
 
PostPosted: Wed Dec 03, 2008 10:23 am 
Offline
DevNet Resident
User avatar

Joined: Wed Jun 18, 2008 8:32 am
Posts: 1483
Location: Surrey


Top
 Profile  
 
PostPosted: Wed Dec 03, 2008 10:24 am 
Offline
DevNet Resident
User avatar

Joined: Wed Jun 18, 2008 8:32 am
Posts: 1483
Location: Surrey


Top
 Profile  
 
PostPosted: Wed Dec 03, 2008 10:56 am 
Offline
Briney Mod
User avatar

Joined: Mon Jan 19, 2004 7:11 pm
Posts: 6446
Location: 53.01N x 112.48W

_________________
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.


Top
 Profile  
 
PostPosted: Wed Dec 03, 2008 11:34 am 
Offline
Forum Contributor

Joined: Wed Nov 05, 2008 1:06 am
Posts: 153


Top
 Profile  
 
PostPosted: Wed Dec 03, 2008 11:55 am 
Offline
Briney Mod
User avatar

Joined: Mon Jan 19, 2004 7:11 pm
Posts: 6446
Location: 53.01N x 112.48W

_________________
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.


Top
 Profile  
 
PostPosted: Wed Dec 03, 2008 12:10 pm 
Offline
Forum Contributor

Joined: Wed Nov 05, 2008 1:06 am
Posts: 153


Top
 Profile  
 
PostPosted: Wed Dec 03, 2008 12:14 pm 
Offline
Briney Mod
User avatar

Joined: Mon Jan 19, 2004 7:11 pm
Posts: 6446
Location: 53.01N x 112.48W
Wrap your call to include in and & the content of your include can then be put in a variable, for use with

_________________
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.


Top
 Profile  
 
PostPosted: Wed Dec 03, 2008 12:26 pm 
Offline
Forum Contributor

Joined: Wed Nov 05, 2008 1:06 am
Posts: 153
It worked pickle.
Thank you.


Top
 Profile  
 
PostPosted: Wed Dec 03, 2008 1:06 pm 
Offline
Forum Contributor

Joined: Wed Nov 05, 2008 1:06 am
Posts: 153


Top
 Profile  
 
PostPosted: Wed Dec 03, 2008 1:11 pm 
Offline
Briney Mod
User avatar

Joined: Mon Jan 19, 2004 7:11 pm
Posts: 6446
Location: 53.01N x 112.48W
Look at the documentation for - you can use arrays.

Also, please post your PHP code in [ code=php ][ /code ] tags so we get syntax highlighting.

_________________
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.


Top
 Profile  
 
PostPosted: Wed Dec 03, 2008 1:37 pm 
Offline
Forum Contributor

Joined: Wed Nov 05, 2008 1:06 am
Posts: 153


Top
 Profile  
 
PostPosted: Wed Dec 03, 2008 1:45 pm 
Offline
Briney Mod
User avatar

Joined: Mon Jan 19, 2004 7:11 pm
Posts: 6446
Location: 53.01N x 112.48W
That's because you're returning the first result of str_replace(), so the second call never happens. Rather than returning the first str_replace(), store it back into $buffer.

You can use arrays for this - build one array of values to search and the other array of values to replace with.

_________________
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: Google [Bot] and 58 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group