[Solved] I am getting error while loading linktext.com from SQL with help of PHP [closed]


I would have a guess that you need escape the quotes or use single quotes in your SQL.

I would have a stab and say your code is outputting an incorrect format for the links.

$url="<a href="https://stackoverflow.com/questions/46113161/link.com">link.com</a>"; ## << This is the value from the database
echo $url;

As you can see there are too many double quotes, you need to stick to a scheme of double quotes in your code and single in variables (the database in this case) or escape the strings

$url = "<a href=\"link.com\">link.com</a>";

or

$url = "<a href="https://stackoverflow.com/questions/46113161/link.com">link.com</a>";

1

solved I am getting error while loading linktext.com from SQL with help of PHP [closed]