Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why won't this create a link?

Tags:

php

I am trying to make a link with PHP and I am not sure what is wrong with this code.

$product_list .= "\n\r " . 'Ticket Download: ' . ": " . <a href=$single_link["url"]>($single_link['name'])</a>  . "\n\r";

I know the issue is with the link (meaning between the opening and closing html tags). What am I doing wrong?

Edit: I have tried using the code you have all provided, and I still can't get it to work. I am not sure why.

like image 728
Tom Avatar asked Dec 03 '11 03:12

Tom


People also ask

Why is a link not working?

Most likely problems with opening hyperlinks are connected with either the security restrictions of your Internet browser that doesn't allow opening pop-up windows, or with your Flash player plug-in that prevents you from opening URLs in local Flash files.

How do I create a link to a URL?

Create a hyperlink to a location on the webSelect the text or picture that you want to display as a hyperlink. Press Ctrl+K. You can also right-click the text or picture and click Link on the shortcut menu. In the Insert Hyperlink box, type or paste your link in the Address box.

How do I enable a link in my email?

Check to see if the email message you're composing or viewing is in plain text. Check to see if an InfoBar at the top of the message informs you that links are disabled. If so, click the button in the InfoBar to enable external content.


1 Answers

$product_list .= PHP_EOL . 'Ticket Download: <a href="' . $single_link['url'] . '">' . $single_link['name'] . '</a>' . PHP_EOL;
like image 89
Book Of Zeus Avatar answered Oct 20 '22 00:10

Book Of Zeus