View Single Post
Old 02-19-2008, 03:35 PM   #10 (permalink)
flyingbuddha
The Contributor
 
flyingbuddha's Avatar
 
Join Date: Jan 2008
Location: Birmingham, UK
Posts: 60
Thanks: 10
flyingbuddha is on a distinguished road
Default

Just to expand on Sock's explanation a tiny bmathers, using quotes inside quotes (as with your example), you're causing confusion to the interpreter, it doesn't know when the sentence is ending and when it's beginning.

That means it's taking '../images/stag.gif' and trying to parse/ call it rather than outputting it, as you're intending.

Couple of bits re. ReSpawn's points,

1. If you use a variable in a string, enclose it in curly braces:
PHP Code:
// not strictly necessary but easier to spot
echo "Hello, my name is {$name}."
2. There's a slight performance benefit from using apostrophe's over quotes when dealing with strings. Apostrophe's are taken as literals so it doesn't try to parse data as strings in quotes' do.
__________________
Pro. Geek
http://www.mikeholloway.co.uk
flyingbuddha is offline  
Reply With Quote