I get the following array from my back end:
[Object { 7="77.105.239.8", 10="77.105.239.11", 18="77.105.239.19", more...}]
How can I use ng-options to fill my select dropdown with the Ips from the array?
The array above Is the result of an array_diff from my back end In PHP:
foreach($ips as $ip)
{
$taken[] = $ip['ip'];
}
$start = (ip2long($serie->net) + 1);
$antal = pow(2,(32-$serie->mask));
for($i = $start; $i < ($start+$antal-3); $i++)
{
if(end(explode(".", long2ip($i))) != "0")
{
$possible_ips[] = long2ip($i);
}
}
$poss = array_diff($possible_ips, $taken);
return $poss;