<?php
$endpoint = array(
"mac_address"=>"989096e255a1",
"status" =>"Known",
"attributes" => array(
"Owner"=>"rogue@wpi.edu",
"IPAM-Hostname"=>"dresden.wpi.edu",
"IPAM-AdminState"=>"OK",
"IPAM-NAS-IP-Address"=>"0",
"IPAM-NAS-Port-ID"=>"1",
"IPAM-RADIUS-VLAN"=>"true",
"IPAM-TimeStamp"=>"2017-07-11 11:18:33 EDT",
"Guest Role ID"=>"false",
"MAC-Auth Expiry"=>"False",
"Username"=>"",
),
"Username"=>"",
);
$endpointcreate = array_filter($endpoint, function($var) {return !empty($var);});
$endpointcreate["attributes"] = array_filter($endpointcreate["attributes"], function($var) {return !empty($var);});
print_r($filtered);
- Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.7
- Warning: Undefined variable $filtered in /in/s0Tcq on line 25
- Output for 7.3.24 - 7.3.31, 7.4.12 - 7.4.33
- Notice: Undefined variable: filtered in /in/s0Tcq on line 25
- Output for 7.3.32 - 7.3.33
preferences:
119.97 ms | 401 KiB | 119 Q