Answers for "php get data from api"

PHP
1

php get data from api

$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);
Posted by: Guest on June-14-2021
0

how to fetch data from url in php properly

use <?php $_SERVER['REQUEST_URI'] ?> in action"" to get the data properly
Posted by: Guest on July-25-2020
0

how to fetch data from url in php properly

Add action="<?php $_SERVER['REQUEST_URI']; ?>" if you dont know just copy and paste it
Posted by: Guest on July-25-2020

Browse Popular Code Answers by Language