Advertisement
Guest User

Untitled

a guest
Jun 29th, 2012
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.89 KB | None | 0 0
  1.                     while($row=mysql_fetch_array($result,MYSQL_ASSOC))
  2.                     {
  3.                         $counter1++;
  4.                         if($row['from_point']==$row['point_id'])
  5.                         {
  6.                             $polylines[$row['polyline_name']][$row['line_seq_number']]["from_point"]["long"]=$row["longitude"];
  7.                         }else
  8.                         {
  9.                             $polylines[$row['polyline_name']][$row['line_seq_number']]["from_point"]["long"]=$row["latitude"];                         
  10.                         }
  11.                     }
  12.                     foreach ($polylines as $v1) {
  13.                         foreach ($v1 as $v2) {
  14.                             if($v2["from_point"]["long"]==$tetmimenh && $v2["from_point"]["lat"]==$tetagmenh || ($v2["to_point"]["long"]==$tetmimenh && $v2["to_point"]["lat"]==$tetagmenh))
  15.                             {
  16. //now i want to copy $polylines['index'] where index is the index that do this match
  17.                                 $counter2++;
  18.                    
  19.                                 foreach ($v1 as $vv2)
  20.                                 {
  21.                                     if($v1[])//here is the problem
  22.                                     $json[$counter2]=$vv2;
  23.                                 }
  24.                             }
  25.                         }
  26.                     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement