I'm basically trying to cycle though the first dimension of a multi-dimensional array. Please look at the code below:
I'm not sure how the syntax of this should be.PHP Code:<?php
$clientList['client1']['IP']="192.168.1.1";
$clientList['client1']['Name']="Client 1";
$clientList['client1']['URI']="client-1";
$clientList['client2']['IP']="192.168.1.2";
$clientList['client2']['Name']="Client 2";
$clientList['client2']['URI']="client-2";
$clientList['client3']['IP']="192.168.1.3";
$clientList['client3']['Name']="Client 3";
$clientList['client3']['URI']="client-3";
foreach ($clientList as $clientListIndex)
{
echo $clientList[$clientListIndex]['Name'];
}
?>




Reply With Quote