Page 1 of 1

string not working

Posted: Sat Jan 11, 2003 10:13 pm
by eggoz
Small problem with a line of code..

Code: Select all

$table = "Aero";

<a href="Result_<? echo $table; ?>.php?value=<? echo $code; ?>"><? echo $des; ?></a>
The problem is, when you publish the link and take a look at it, it gives me something like this...

Result_$table.php?value=AERO002

It should be giving me a value for table. Any idea why this is happening?
Thanks.

Posted: Sat Jan 11, 2003 10:48 pm
by evilcoder
try this:

<a href="Result_<?=$table ?>.php?value=<?=$code ?>"><?=$des ?></a>

Thanks

Posted: Sat Jan 11, 2003 11:10 pm
by eggoz
That worked like a charm. Wish my book would mention things like this. Probably does somewhere. Thanks.

Diego

Posted: Sat Jan 11, 2003 11:17 pm
by evilcoder
no book really tells you that. Books are bull**** . When my site opens you'l never need a book.

http://www.digitalnetworkz.com

will be australias first program development site. (Free tutorials etc.)