Jump to content

<a href> tag inside PHP


ainoy31

Recommended Posts

You need to escape the double quotes. If you include double quotes inside the php echo statement, it will think you closed the string to output.

 

<?php
echo "<a style=\"color:#fff;text-decoration:none;\" href=\"../myFlights.php\">Click Here to view your flights</a>.";
?>

 

The \ character tells php that you want the character following to literally appear in the string for output.

Link to comment
https://forums.phpfreaks.com/topic/61540-tag-inside-php/#findComment-306294
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.