2
0

task 2,3: XML->Json, SQL TAble -> JSON

This commit is contained in:
cwikladaniel
2026-02-05 10:41:18 +01:00
parent 9f9625ff58
commit 21471e419e
5 changed files with 126 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$phpArr = [
"vorname" => "Daniel",
"nachname" => "C",
"schule" => "wvss",
"hatFuehrerschein" => true,
"alter" => 67
];
$phpJson = json_encode($phpArr);
echo "arr into json transfered<br>";
$file = file_put_contents("daniel.json", $phpJson);
echo "file created<br>";