Echoing URL links as hyperlinks

Hi Y’all,

I hoping someone can help me please!

I have a database which contains various URL references.
I would like to display these references in a table on my webpage, but not the full URL (too lengthy), instead I would just like an type link.

I’m using the following loop to display the data:

[php]while($row = mysqli_fetch_array($result)) {
echo “

”;
echo “” . $row[‘Seller’] . “”;
echo “” . $row[‘Startdate’] . “”;
echo “” . $row[‘Enddate’] . “”;
echo “” . $row[‘Offer’] . “”;
echo “” . $row[‘Item’] . “”;
echo “” . $row[‘Was’] . “”;
echo “” . $row[‘Now’] . “”;
echo “” . $row[‘USMLshipping’] . “”;
echo “” . $row[‘USOSshipping’] . “”;
echo “” . $row[‘International’] . “”;
echo “” . $row[‘DandDtime’] . “”;
echo “” . $row[‘Returnspolicy’] . “”;
echo “” . $row[‘Misc’] . “”;
echo “”;
}
echo “”;[/php]

I’m sure it’s pretty simple but if someone could point me in the right direction I’d really appreciate it!
Thanks in advance.

I think you are misunderstanding what does an does not get displayed. Consider this:

Click Here
http://www.phphelp.com/

Both go to the same place, but what is displayed is drastically different.

Ok. thanks.
But how do I echo the hyperlink with a title like “click here” but without displaying the URL address (exactly as you have demonstrated in the first example above) ?

Before you pursue PHP further, learn HTML.

[php]display text[/php]

Ok. thanks for that…
I think I’ve solved it now.
All I needed to do was simply save each URL to the database with the html code:

display text

Again, many thanks for your really very useful advice.

Sponsor our Newsletter | Privacy Policy | Terms of Service