![]() |
stupid simple question
how can i output an image in this code;
PHP Code:
|
Which image? Where you getting the image from?
|
Code:
<img src="path/to/image.gif" alt="Alt text" /> |
thats what i thought but its not working, ive tried this but cant get it too work
PHP Code:
|
Quote:
|
php Code:
|
can you explain what the difference is between the single and double qoutes, sorry for being simple, justtrying to understand everything.
|
Quote:
PHP Code:
Hello, my name is insert_name_hereThe same doesn't go for the single quotes although they are a lot easier to use. Since you'll make echo's like this; PHP Code:
"\n" (HTML Enter) and "\r" (HTML Tab).Good luck! |
... that's correct ReSpawN, but I think the real issue was non-escaped double quotes. That's the reason Wildhoney corrected the string.
In any event, bmathers, you should spend some time reading through the PHP Manual, especially the language reference. |
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:
|
I also published a little article on double and single quotes over here.
|
You should built in a feature when the post is one above the poster, auto add a thanks. :-P
|
| All times are GMT. The time now is 05:48 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0