Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Closed Thread
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-23-2004, 09:29 PM   PM User | #1
Richard
Regular Coder

 
Join Date: Jun 2002
Location: England
Posts: 172
Thanks: 0
Thanked 0 Times in 0 Posts
Richard is an unknown quantity at this point
Arrow Problem with this..

PHP Code:
$piconeloc "blah.jpg";
$piconew "250";
$piconeh "150";
$piconealt "blah blah";

$desc str_replace("*picone*""<img src=\"/images/$piconeloc\" width=\"$piconew\" height=\"$piconeh\" alt=\"$piconealt\" align=\"right\" border=\"0\">""$desc");

echo 
"$desc"
This just echoes:

Quote:
<img src="/images/" width="" height="" alt="" align="right" border="0">
Why isn't it including the info in the $'s? They definately exist.
__________________
\o/
Richard is offline  
Old 10-23-2004, 10:10 PM   PM User | #2
raf
Master Coder


 
Join Date: Jul 2002
Posts: 6,589
Thanks: 0
Thanked 0 Times in 0 Posts
raf will become famous soon enoughraf will become famous soon enough
Try:
PHP Code:
$piconeloc 'blah.jpg';
$piconew '250';
$piconeh '150';
$piconealt 'blah blah';

$desc str_replace('*picone*''<img src="/images/' $piconeloc '" width="' $piconew '" height="' $piconeh '" alt="' $piconealt .'" align="right" border="0" />'$desc); 
__________________
Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html
raf is offline  
Old 10-24-2004, 12:02 AM   PM User | #3
Spookster
Supreme Overlord


 
Spookster's Avatar
 
Join Date: May 2002
Location: Marion, IA USA
Posts: 6,220
Thanks: 4
Thanked 80 Times in 79 Posts
Spookster will become famous soon enough
Try reading our POSTING GUIDELINES sometime
__________________
Spookster
CodingForums Supreme Overlord
All Hail Spookster
Who gave you that Ugging infraction? Yeah that's right it was me!
Spookster is offline  
Old 10-24-2004, 03:15 PM   PM User | #4
Richard
Regular Coder

 
Join Date: Jun 2002
Location: England
Posts: 172
Thanks: 0
Thanked 0 Times in 0 Posts
Richard is an unknown quantity at this point
Well how about being sa bit more constructive and try to suggest a subject title that could have been used? I can't think of one.

Do you not take into account the fact that some people are not that good at asking questions or thinking up complicated subject titles?
__________________
\o/
Richard is offline  
Old 10-24-2004, 04:19 PM   PM User | #5
marek_mar
Sensei


 
Join Date: Aug 2003
Location: One step ahead of you.
Posts: 2,815
Thanks: 0
Thanked 3 Times in 3 Posts
marek_mar is on a distinguished road
If we would take that into account you will have to take in account that you will get now anwser.

You are the one that want's something not us.
marek_mar is offline  
Old 10-24-2004, 06:37 PM   PM User | #6
Spookster
Supreme Overlord


 
Spookster's Avatar
 
Join Date: May 2002
Location: Marion, IA USA
Posts: 6,220
Thanks: 4
Thanked 80 Times in 79 Posts
Spookster will become famous soon enough
Quote:
Originally Posted by Richard
Well how about being sa bit more constructive and try to suggest a subject title that could have been used? I can't think of one.

Do you not take into account the fact that some people are not that good at asking questions or thinking up complicated subject titles?
Complicated?

Subject: PHP echo problems

That didn't seem too complicated to me.
__________________
Spookster
CodingForums Supreme Overlord
All Hail Spookster
Who gave you that Ugging infraction? Yeah that's right it was me!
Spookster is offline  
Old 10-24-2004, 11:52 PM   PM User | #7
trib4lmaniac
Regular Coder

 
trib4lmaniac's Avatar
 
Join Date: Feb 2004
Location: Cornwall, UK
Posts: 535
Thanks: 0
Thanked 0 Times in 0 Posts
trib4lmaniac is an unknown quantity at this point
But... did it fix it? I take it it did, 'cos you don't seem too bothered about it anymore.
trib4lmaniac is offline  
Old 10-25-2004, 12:04 AM   PM User | #8
Richard
Regular Coder

 
Join Date: Jun 2002
Location: England
Posts: 172
Thanks: 0
Thanked 0 Times in 0 Posts
Richard is an unknown quantity at this point
Quote:
Originally Posted by trib4lmaniac
But... did it fix it? I take it it did, 'cos you don't seem too bothered about it anymore.
Yes thank you it's fine now.

btw spookster it was a str_replace problem, and it is a php forum so no need to put php in the subject eh :P
__________________
\o/
Richard is offline  
Old 10-25-2004, 12:18 AM   PM User | #9
Spookster
Supreme Overlord


 
Spookster's Avatar
 
Join Date: May 2002
Location: Marion, IA USA
Posts: 6,220
Thanks: 4
Thanked 80 Times in 79 Posts
Spookster will become famous soon enough
Quote:
Originally Posted by Richard
Yes thank you it's fine now.

btw spookster it was a str_replace problem, and it is a php forum so no need to put php in the subject eh :P
The easiest way to come up with a proper subject is to type in your question or code and then look through that for keywords or code statements. "Problem with str_replace" or "str_replace not working" would have been just fine as a subject line. The more specific the better. The reason we stress proper subject lines is because when people use our search feature and come up with a list of 50 results they will want to be able to sift through the subject lines of the results without having to open each and every thread to see if the thread is related to their problem.
__________________
Spookster
CodingForums Supreme Overlord
All Hail Spookster
Who gave you that Ugging infraction? Yeah that's right it was me!
Spookster is offline  
Old 10-25-2004, 01:30 PM   PM User | #10
trib4lmaniac
Regular Coder

 
trib4lmaniac's Avatar
 
Join Date: Feb 2004
Location: Cornwall, UK
Posts: 535
Thanks: 0
Thanked 0 Times in 0 Posts
trib4lmaniac is an unknown quantity at this point
I would have called it "str_replace not replacing" or something similar
trib4lmaniac is offline  
Old 10-25-2004, 04:02 PM   PM User | #11
raf
Master Coder


 
Join Date: Jul 2002
Posts: 6,589
Thanks: 0
Thanked 0 Times in 0 Posts
raf will become famous soon enoughraf will become famous soon enough
i would have called it:

"embedded values not showing in doublequoted string used in str_replace()"
__________________
Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html
raf is offline  
Old 10-25-2004, 04:14 PM   PM User | #12
trib4lmaniac
Regular Coder

 
trib4lmaniac's Avatar
 
Join Date: Feb 2004
Location: Cornwall, UK
Posts: 535
Thanks: 0
Thanked 0 Times in 0 Posts
trib4lmaniac is an unknown quantity at this point
Quote:
Originally Posted by raf
i would have called it:

"embedded values not showing in doublequoted string used in str_replace()"
Right... bit long winded for me. Each to there own though
trib4lmaniac is offline  
Old 10-25-2004, 07:41 PM   PM User | #13
raf
Master Coder


 
Join Date: Jul 2002
Posts: 6,589
Thanks: 0
Thanked 0 Times in 0 Posts
raf will become famous soon enoughraf will become famous soon enough
i already trimmed it down from

"terrible codingproblem with embedded variables' values that are not showing in doublequoted string that serves as the replacevalue in the str_replace() function i am using, is giving me a headache"
__________________
Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html
raf is offline  
Old 10-26-2004, 12:14 AM   PM User | #14
trib4lmaniac
Regular Coder

 
trib4lmaniac's Avatar
 
Join Date: Feb 2004
Location: Cornwall, UK
Posts: 535
Thanks: 0
Thanked 0 Times in 0 Posts
trib4lmaniac is an unknown quantity at this point
Quote:
Originally Posted by raf
i already trimmed it down from

"terrible codingproblem with embedded variables' values that are not showing in doublequoted string that serves as the replacevalue in the str_replace() function i am using, is giving me a headache"
trib4lmaniac is offline  
Old 11-08-2004, 07:31 PM   PM User | #15
jkrolen
New to the CF scene

 
Join Date: Nov 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
jkrolen is an unknown quantity at this point
bad-juju

Last edited by firepages; 11-08-2004 at 10:24 PM..
jkrolen is offline  
Closed Thread

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:02 AM.


Advertisement
Log in to turn off these ads.