02-19-2008, 03:35 PM
|
#10 (permalink)
|
|
The Contributor
Join Date: Jan 2008
Location: Birmingham, UK
Posts: 60
Thanks: 10
|
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.
|
|
|
|