tags:

views:

27

answers:

4

Hello guys,

I am trying to anchor an echo value. My code is as follows;

while ($row = mysql_fetch_assoc($result)){

echo $row(['links'];

}

I would like to anchor the value of echo $row['links'] in HTML.

Thanks guys.

+1  A: 

I think you want:

while ($row = mysql_fetch_assoc($result)){

  echo "<a href='".$row['links']."'>some link name</a>";

}

but the question was a little unclear

Jonathan Fingland
almost the same rep, almost same first name, beat me by 35 seconds.
John Boker
exactly what i wanted =D thanks!
Tim
@John, thanks =)
Tim
glad to help :)
Jonathan Fingland
+1  A: 

you mean?

while ($row = mysql_fetch_assoc($result)){

echo "<a href='" . $row['links'] . "'> text here </a>";

}
John Boker
A: 
<ul>
<?php while ($row = mysql_fetch_assoc($result)): ?>
<li><p class="links">
<?php echo($row['links']); ?>
</p></li>
<?php end_while; ?>
</ul>
CodeJoust
haven't tried this out, but thanks! =)
Tim
A: 

You are missing a parenthesis.

It should be: echo $row(['links']);

Josh Curren