href in php

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
yasir_memon
Forum Commoner
Posts: 48
Joined: Tue Aug 11, 2009 12:29 am

href in php

Post by yasir_memon »

can i use

<a href=" ">name</a>

in php i want to give reference on image icon so if it is possible kindly tell me how can i do this
User avatar
mrvijayakumar
Forum Commoner
Posts: 58
Joined: Tue Aug 18, 2009 12:39 am
Location: Chennai city, India
Contact:

Re: href in php

Post by mrvijayakumar »

R u asking like this?,

Code: Select all

<?php
echo "<a href='imagename.jpg'>image name</a>";
?>
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Re: href in php

Post by Ollie Saunders »

An image:

Code: Select all

<img src="image filename" />
A hyperlink:

Code: Select all

<a href="to where">stuff in here</a>
Thus, a hyperlinked image:

Code: Select all

<a href="to where"><img src="image filename" /></a>
Any basic tutorial/book on HTML, which are numerous online, will cover this in greater depth. Good luck!
Post Reply