Ver Mensaje Individual
  #1 (permalink)  
Antiguo 01/01/2011, 18:00
Avatar de neodani
neodani
 
Fecha de Ingreso: marzo-2007
Mensajes: 1.811
Antigüedad: 17 años, 1 mes
Puntos: 20
Cómo recorrer el siguiente array

Buenas,

Dispongo del siguiente array, y me interesaría poderlo recorrer para extraer por ejemplo todos los marketName, pero si lo intento de la siguiente forma

Código PHP:
Ver original
  1. foreach ($allmercados as $mercados){
  2.     echo $allmercados->marketName."<br/>";
  3. }

Me da el siguiente error en la linea del echo.
Notice: Trying to get property of non-object in C:\wamp\www\00-laboratorio_test\secciones\prueba\mercados.php on line 91

Código:
Array
(
    [marketDate_1] => Array
        (
            [marketId] => 102079920
            [marketName] => Ath Bilbao Win to Nil
        )

    [marketDate_2] => Array
        (
            [marketId] => 102079921
            [marketName] => Ath Bilbao Total Goals
        )

    [marketDate_3] => Array
        (
            [marketId] => 102079929
            [marketName] => Ath Bilbao Win Both Halves
        )

    [marketDate_4] => Array
        (
            [marketId] => 102079930
            [marketName] => Deportivo Win Both Halves
        )
)
Sabéis como puedo listar todos los marketName?

Muchas gracias de antemano