Web Hosting Talk







View Full Version : one line question..


brcolow
11-17-2002, 06:45 PM
Whats wrong with this line?

print"<A HREF=\"http://www.flashstand.com/images/screenshots/$row->name\"><IMG HEIGHT=50 WIDTH=50 SRC=\"A HREF=\"http://www.flashstand.com/images/screenshots/$row->name\"></A>;

i am a
11-17-2002, 07:13 PM
may want to encapsulate the variable in parentheses:

ie


print "this is a {$row->value} variable";

KoWind
11-17-2002, 07:38 PM
Looks to me like the original line is missing the end "

MarkIL
11-17-2002, 11:06 PM
printf ('<A*HREF="http://www.flashstand.com/images/screenshots/%s"><IMG*HEIGHT=50*WIDTH=50*SRC="http://www.flashstand.com/images/screenshots/%s"></A>',$row->name);

brcolow
11-18-2002, 09:16 PM
still getting error, i added the quote..

Rich2k
11-19-2002, 05:25 AM
What is the actual error message you are getting and are you using Perl or PHP as structrually from that line you posted they are very similar.

Additionally put a space between print and "

YUPAPA
11-20-2002, 12:36 AM
Why not just use this?

PERL:
print qq(<A HREF="http://www.youurl/$yourvariable"><IMG SRC="http://yoururl/$yourvariable"></A>)."\n";