Posted by Nick on 11/24/05 17:32
kevin bailey wrote:
> hi,
>
> using pg_fetch_object() to get a row from a recordset.
>
> the recordset was extracted from a view on a database.
>
> the view has fields in it where the the field name contains spaces 'Base
> Total' etc.
>
> now when i refer to the field using
>
> $total_base = "Total Base";
> $base_total = $row->$total_base;
>
> it works ok.
>
> but to be neater is there anyway that:
>
> $base_total = $row->'Total Base';
Have you tried
$row->{'Total Base'}
Navigation:
[Reply to this message]
|