@mgm-ivr אמר בעזרה בשליפת נתונים ממערך ולולאה:
אז מה אני כן יכול לעשות?
להוריד סיומת, לוודא שזה מספרים, ולקחת טלפון.
$get_url = file_get_contents("https://www.call2all.co.il/ym/api/GetIvrTree?token=X:X&path=ivr2:/0");
$file = json_decode($get_url, true);
foreach ($file["items"] as $key => $value) {
if ($value["fileType"] === "AUDIO") {
$split = explode(".", $value["name"]);
if (is_numeric($split[0])) {
$firstFile = $value;
break;
}
}
}
var_dump($firstFile['phone']);