user1050667
user1050667

Reputation: 453

How to put hyperlink in echo line?

I tried to put hyperlink in Echo line in PHP but it is showing me a syntax error like this:

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/content/48/11655748/html/display_comments.php on line 29

My Code is:

 echo "<div style='margin:30px 0px;'>
       <table>  
                 <tr>
        <td>Resume :"<a href=http://testing.com/wp-content/uploads/rsjp/attachments/>$attachment</a>"</td>
        </tr>
    </table>

         </br>
        </div>";

Please help me guys..I don't know whats wrong in this ...Actually I am new to PHP..

Upvotes: 0

Views: 67

Answers (1)

GluePear
GluePear

Reputation: 7735

You have redundant quotes. It should be:

echo "<div style='margin:30px 0px;'>
       <table>  
                 <tr>
        <td>Resume :<a href='http://testing.com/wp-content/uploads/rsjp/attachments/'>$attachment</a></td>
        </tr>
    </table>

         </br>
        </div>";

Upvotes: 3

Related Questions