title: How can i create a LineString geoJson with data from data base?
body: <p>ok, so I know how to convert data from php to geojson format into point types but i dont understand how can I make this into a lineString type here is the code, so the question is how can i get the coordinates data into one array :</p>
  
  <pre><code>    include('testcon.php');
  
  
     $query=pg_query($connect,"SELECT number, state, data, latitude, 
         long "
          . "FROM schema.table "
          . "WHERE number = '63' AND "
          . "data BETWEEN '2018-12-01 00:00:00' and '2018-12-01 23:59:59' 
       limit 200 ");
      # Try query or error
  
  
    # Build GeoJSON feature collection array
          $geojson = array(
        'type'      =&gt; 'FeatureCollection',
           'features'  =&gt; array()
          );
           # Loop through rows to build feature arrays
            while($row = pg_fetch_array($query)) {
  $feature = array(
      'type' =&gt; 'Feature', 
      'geometry' =&gt; array(
          'type' =&gt; 'Point',
          # Pass Longitude and Latitude Columns here
          'coordinates' =&gt; array($row['long'], $row['lat'])
      ),
      # Pass other attribute columns here
      'properties' =&gt; array(
          'indicativ' =&gt; $row['number'],
          'stare' =&gt; $row['state'],
  
          )
      );
      # Add feature arrays to feature collection array
      array_push($geojson['features'], $feature);
     }
   header('Content-type: application/json');
     echo json_encode($geojson, JSON_NUMERIC_CHECK);
     $conn = NULL;
  
        ?&gt;
  </code></pre>