user1715416
user1715416

Reputation:

link inside php variable and table

I want to display my data with a link functionality inside the php tag

<td><a href ="<? print $row->courier_url;?>"></a></td>

this is my code, Its not working.

Upvotes: 0

Views: 478

Answers (4)

Nil&#39;z
Nil&#39;z

Reputation: 7475

Try:

<td><a href ="<?=$row->courier_url;?>">Link</a></td>

Upvotes: 0

Matheno
Matheno

Reputation: 4142

<td><a href ="<? echo $row->courier_url; ?>"><? echo $row->courier_url; ?> </a></td>

Upvotes: 1

Novocaine
Novocaine

Reputation: 4786

First off, remove the space between href = so it's href=. Your php code is actually valid, does $row->courier_url actually print anything? How is $row being defined?

Also, don't use shorthand <? php tags use the full <?php. It's bad practice to use the shorthand version.

Upvotes: 0

coder
coder

Reputation: 701

I think this will work for you,

<td><a href ="<?=$row->courier_url; ?>"></a></td>

Upvotes: 0

Related Questions