string not working

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
eggoz
Forum Commoner
Posts: 43
Joined: Fri Dec 27, 2002 8:51 pm

string not working

Post 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.
evilcoder
Forum Contributor
Posts: 345
Joined: Tue Dec 17, 2002 5:37 am
Location: Sydney, Australia

Post by evilcoder »

try this:

<a href="Result_<?=$table ?>.php?value=<?=$code ?>"><?=$des ?></a>
eggoz
Forum Commoner
Posts: 43
Joined: Fri Dec 27, 2002 8:51 pm

Thanks

Post by eggoz »

That worked like a charm. Wish my book would mention things like this. Probably does somewhere. Thanks.

Diego
evilcoder
Forum Contributor
Posts: 345
Joined: Tue Dec 17, 2002 5:37 am
Location: Sydney, Australia

Post 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.)
Post Reply