17 lines
335 B
PHP
17 lines
335 B
PHP
|
<?php
|
||
|
$user["name"] = "Henrik";
|
||
|
$user["age"] = 11;
|
||
|
$response[] = $user;
|
||
|
|
||
|
$user["name"] = "Eva";
|
||
|
$user["age"] = 14;
|
||
|
$response[] = $user;
|
||
|
|
||
|
$user["name"] = "Lisa";
|
||
|
$user["age"] = 15;
|
||
|
$response[] = $user;
|
||
|
|
||
|
header('Access-Control-Allow-Origin: *'); // http://localhost
|
||
|
header('Content-Type: application/json');
|
||
|
|
||
|
echo json_encode($response);
|