Re: Array... Parent IDs...
| From: | Michael Smith | Date: | Tue, 08 Apr 2003 16:44:32 +0000 |
| Subject: | Re: Array... Parent IDs... | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-142910@lists.php.net to get a copy of this message | ||
> This is untested, but it should do what you want :
>
>
> while(list($key,$val) = each ($_tmpArray))
> {
> if (is_array($val))
> {
> while (list($k,$v) = each ($val))
> {
>
> if ($k == "product_id" && !is_array(${"pid_$v"})
I get an error here: parse error, unexpected '{'? PLEASE HELP!
> {
> $n = $v;
> ${"pid_$v"} = array();
> continue;
>
> }
> else { ${"pid_$n"}[] = $v; }
> }
> }
> }
>
> --
> Burhan Khalid
> phplist[at]meidomus[dot]com
>
> Please add a reply-to:php-general@lists.php.net
> header in your emails
>
--
Michael Smith <msmith@custom87.net>
Custom87.net