Re: a basic array question!
| From: | Brian V Bonini | Date: | Sun, 26 Jun 2005 01:03:39 +0000 |
| Subject: | Re: a basic array question! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-217635@lists.php.net to get a copy of this message | ||
On Sat, 2005-06-25 at 17:01, bruce wrote:
> feel kind of foolish posting this.. but i can't seem to figure it out for
> now..
>
> i have an array, i can do a print_r($foo) and get the following:
> Array
> (
> [bookmark] => 1
> [facets] => Array
> (
> [0] => Array
> (
> [lastname] => <form id="facet-lastname">
> <input type="hidden" name="list" value="" />
> <input type="hidden" name="offset" value="0" />
> <input type="hidden" name="orderBy" value="username" />
> <input type="hidden" name="sort" value="asc" />
> <strong>Name:</strong>
> <input type="text" name="_lastname" value=""
> style="width: 125px" />
> <input type="submit" value="Search" />
> </form>
> }
>
> i simply need to know how to get the actual value of an element ('lastname')
> to do:
> $cat = $foo->facets[0]->['lastname'] (obviously, this doesn't work!!)
>
$lastname = $foo['facets'][0]['lastname'];