Simple code needed please (writing a html url)

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
webman
Forum Newbie
Posts: 13
Joined: Thu May 27, 2010 8:20 am

Simple code needed please (writing a html url)

Post by webman »

Hello,

I have these two variables:

$link :the remote site's url
$title :the remote site's name

I need a php code that produces this html code:

<a target="_blank" href="$link">$title</a>

Thanks in advance for you time!
dimxasnewfrozen
Forum Commoner
Posts: 84
Joined: Fri Oct 30, 2009 1:21 pm

Re: Simple code needed please (writing a html url)

Post by dimxasnewfrozen »

You had it right almost.

index.php

Code: Select all

<a target="_blank" href="<?php echo $link; ?>"><?php echo $title; ?> </a>
Post Reply