syntax issues

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Smudly
Forum Commoner
Posts: 71
Joined: Wed Jun 09, 2010 10:09 pm

syntax issues

Post by Smudly »

I'm having a slight problem setting an img tag in a variable. This variable will be called later in the page.

Code: Select all

$avatar = $uploadrow['avatar'];
$avatarshow = "<img src=\'/avatars/$avatar\' width=\'100\' height=\'100\'>";
Now I am certain the problem is with my syntax in the avatarshow variable. I tested it by typing out the full name of the file, and it is shown just fine. But doing it this way causes problems. Any suggestions on fixing this code?

(I'm not getting any mysql errors)
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: syntax issues

Post by requinix »

Causes problems like... what? Feeling like sharing a bit more information? Maybe some code?
Post Reply