Skip to content

Instantly share code, notes, and snippets.

@olleman42
Created October 1, 2012 12:36
Show Gist options
  • Save olleman42/3811407 to your computer and use it in GitHub Desktop.
Save olleman42/3811407 to your computer and use it in GitHub Desktop.

Revisions

  1. olleman42 created this gist Oct 1, 2012.
    10 changes: 10 additions & 0 deletions gistfile1.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    $data = json_decode(file_get_contents($restRequest));

    foreach($data->DepartureBoard->Departure as $dep)
    {
    $bookval = (isset($dep->booking)) ? "mustBook" : NULL;
    $main[] = array($dep->time, $bookval);
    }


    print json_encode($main);