fixed php error; getting first array element