php get data from api example code

php get data from api example code

php get data from api example

php get data from api example in php

$api_url = 'http://dummy.restapiexample.com/api/v1/employees';

// Read JSON file
$json_data = file_get_contents($api_url);

// Decode JSON data into PHP array
$response_data = json_decode($json_data);

// Print data if need to debug
//print_r($user_data);
By Manish Salunke In php -

Tags:

php

Sponsors

themeforest
pluralsight
Invest in you. Online courses as low as $11.99