Re: [PHP] Getting the array element

2006-05-04 Thread Jochem Maas
Jonas Rosling wrote: Hi again all, Here my next PHP newbie question. When I'm building an array as bellow. Is there any way I can get the left element out of the array? the 'left element' is the key. $salesperson = array(); while($row=mysql_fetch_array($result)) {

[PHP] Getting the array element

2006-05-04 Thread Jonas Rosling
Hi again all, Here my next PHP newbie question. When I'm building an array as bellow. Is there any way I can get the left element out of the array? $salesperson = array(); while($row=mysql_fetch_array($result)) { $salesperson[$row[1]] = '0'; } If I write: echo $sale