0

What I'm trying to do is to get the all the child or users from firebase. Here is the JSON Data:

    {
      "users":{
             "USER1":{
                      "data1": "123",
                      "data2": "123"
                     },
             "USER2":{
                      "data1" : "456",
                      "data2" : "456"
                     }
              }
    }

Does anyone know how to get the child using firebasephp? I am using https://github.com/ktamas77/firebase-php this firebase php.

1 Answers1

1

I'm not a PHP developer so this may not be 100% valid php but looking at the code you would do something possibly like this

$firebase = new Firebase('http://myfirebasename.firebaseio.com', TOKEN);
$users = $firebase->get('/users');

This should return you an array of the data at that endpoint.

Tom Maton
  • 1,564
  • 3
  • 23
  • 41