I have some code which displays distance from a fixed point. The following
$distance->build_result();
Gives this result:
Array ( [id] => 2 [firstname] => First [lastname] => Last [email] => x @xxx.com [distance] => 20.787052813870147 )
Array ( [id] => 1 [firstname] => First1 [lastname] => Last1 [email] => x1 @xxx.com [distance] => 233.50521194988923 )
How do I display the results in a table form, display the distance result to the nearest whole number as below:
id | firstname | lastname | email | distance
1 | First | Last | x @xxx.com | 21
2 | First1 | Last1 |x1 @xxx.com | 234
I have followed various suggestions from posts relating to displaying an array in an html table format, however currently I can’t get it to work.
Finally I want the id to be clickable, so it opens a page which displays the whole of the record information. Currently the array passed is a summary.
Any advice with this would be greatly appreciated.