var array=[[a[0].value, b[0].value, c[0].value],[a[1].value, b[1].value, c[1].value] ... [a[i].value, b[i].value, c[i].value]];
$basepoint=mysqli_query($link, "SELECT `teletime`, `lng`, `lat`, `distance`, `name`, `id_point` , `id_transport` , `finish` FROM (SELECT (name != @prev)ok, (@prev := `name`)`name`, `distance` , id, `teletime` , `id_transport` , `id_point`, `lng`, `lat`, `finish` FROM time_distance, (SELECT @prev := '')x WHERE DATE(`teletime`) LIKE SUBDATE( CURDATE( ) , 1) ORDER BY `id_transport` , `teletime` ASC)xx WHERE ok ") or printf("Errormessage: %s\n", mysqli_error($link));
if($basepoint)
{
while($basepoint_v=mysqli_fetch_array($basepoint))
{
$name=$basepoint_v['name'];
echo $name;
}
}