Page 1 of 1

echo output formatting

Posted: Tue Nov 08, 2005 9:34 am
by mhouldridge
Hi,

I have the following code;

Code: Select all

"<a href=\"myprofile.php\" class=\"blue2\">My Profile</a>""<a href=\"logout.php\" class=\"blue2\">logout</a>";

This displays two links on the same line, right next to each other. I would like to know how I could seperate these with an image (my spacer image).

thansks

Posted: Tue Nov 08, 2005 9:49 am
by pickle
This is pretty basic HTML stuff:

<a href=\"myprofile.php\" class=\"blue2\">My Profile</a>"<img src = "your_image.jpg">"<a href=\"logout.php\" class=\"blue2\">logout</a>

Posted: Tue Nov 08, 2005 9:54 am
by mhouldridge
Hi,

That doesnt work;

echo <a href=\"myprofile.php\" class=\"blue2\">My Profile</a>"<img src = "your_image.jpg">"<a href=\"logout.php\" class=\"blue2\">logout</a>

Posted: Tue Nov 08, 2005 9:56 am
by mhouldridge
also tried....

Code: Select all

echo "<a href=\"myprofile.php\" class=\"blue2\">My Profile</a>"<img src= "1x1.gif" width="10">"<a href=\"logout.php\" class=\"blue2\">logout</a>";

that doesnt work either.

Posted: Tue Nov 08, 2005 10:20 am
by feyd
uhm, yeah....

Code: Select all

echo '<a href="myprofile.php" class="blue2">My Profile</a><img src="1x1.gif" width="10"><a href="logout.php" class="blue2">logout</a>';

Posted: Tue Nov 08, 2005 10:23 am
by mhouldridge
that's done it!

Cheers!