non è che crea l'array associativo...$row è già un array associativo... quindi lo stai "copiando" nell'array $data['locations']