Click here to Skip to main content
15,905,420 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, I am trying to figure out why this line doesn't work. Bascially I want to pendhyper field (pulled from mysql) from html table to point to link\pendhyper.htm

What I have tried:

echo "<td><a href="C:\illustration\pending\html\ . $row['pendhyper'] . 'htm' ">". $row['pendhyper'] . "</a></td>";


Error: unexpected 'C' (T_STRING), expecting ',' or ';' in C:\inetpub\wwwroot\illustration\pending\index.php on line 87
Posted
Updated 8-May-19 8:53am
Comments
[no name] 8-May-19 12:35pm    
https://stackoverflow.com/questions/18916966/add-php-variable-inside-echo-statement-as-href-link-address
Member 14315552 8-May-19 14:05pm    
tried it but can't get it to work, can you provide solution here

1 solution

echo "<td><a href="C:\illustration\pending\html\ . $row['pendhyper'] . 'htm' ">". $row['pendhyper'] . "</a></td>";


You are missing a   "   before the first . $row['pendhyper'] so your sting setup is incomplete.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900