Jump to content

[SOLVED] Syntax question


sanderphp

Recommended Posts

Not really sure what you mean by that but I only want the hyperlink in the first cell of the table. I'm new at this and trying to learn. This is how I figured out how to make my page work.  I'm sure there is a better way of doing this, but I'm just proud that I have made it this far.

 

	echo '<table>';
	echo "<td>Date</td>";
  echo "<td>Miles</td>";
  echo "<td>Time</td>";
  echo "<td>Average</td>";
foreach($results as $r){
      echo '<tr>';
      echo '<td> <a href="singlerecord.php?id='.$r['id'].'">'.$r['date'].'</a></td>';
  echo '<td>' . $r['total_distance'] . '</td>';
  echo '<td>' . $r['total_time'] . '</td>';
  echo '<td>' . $r['ave_speed'] . '</td>';
      
      echo '</tr>';
}
echo '</table>';

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.