[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
[Mapserver-users] Read all fields of dbf file when querying
Stefan Schwarzer wrote:
> Thanks Daniel,
>
> but unfortunately I do not know the names of the fields, so that I can't
> access the fields like "$population = $shape->values["Population"];",
> but rather I should retrieve the results by using the column-number [0,
> 1, 2, ....]. But this does not work. Any further suggestion?
>
You could possibly walk the array using the following kind of loop ot
either dump the values or figure the name of the fields.
(This is untested code BTW)
while( list($key, $val) = each( $shape->values ) )
{
echo $key . " = " . $val;
}
Daniel
--
------------------------------------------------------------
Daniel Morissette morissette@dmsolutions.ca
DM Solutions Group http://www.dmsolutions.ca/
------------------------------------------------------------