Click to See Complete Forum and Search --> : print the function


rashmi_k28
09-08-2008, 12:13 AM
Hi,

I have called a function

$centre=updown();
$nodes=array('aaa','bbb');

I have to print

$centre['aaa'][0];
$centre['bbb'][1];


When i use the code like this
all the values are printed for all the values in the array $nodes

for($i=0;$i<=count($centre);$i++){
foreach($nodes as $nod){
print $centre[$nod][$i];
}
}


If the nod='aaa' then only $centre[0] should be printed

If th nod='bbb' then only $centre[1] should be printed.

How to print the function based on this