Adding a db link to a table output

Hi,

I have been so busy learning complex setups in the past weeks, so I have forgotten some of the basics :)

So - can anyone guide me to the right syntax for this link (the content of the Sogn column should activate the link in the URL column):
<?php
         $link1 = sprintf("<a href='%s' target='_blank'>%s</a>", $row["URL"], $row["Sogn"]); 
         ?>

Open in new window

So that I can use it as $link1 here:
      <?php while($row = $result=mysqli_fetch_array($raw_results)): ?>
        <tr>
          <td><?php echo $row["Stednavn"] ?></td>
          <td><?php echo $link1 ?></td>
          <td><?php echo $row["Herred"] ?></td>
          <td><?php echo $row["Amt"] ?></td>
          <td><?php echo $row["Kort"] ?></td>
        </tr>
      <?php endwhile; ?>

Open in new window

Peter KromanSenior Proposal SpecialistAsked:
Who is Participating?
 
Peter KromanConnect With a Mentor Senior Proposal SpecialistAuthor Commented:
I am closing this again. Have worked it out :)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.