Re: Nested foreach ?
| From: | Robby Russell | Date: | Sun, 17 Oct 2004 19:30:51 +0000 |
| Subject: | Re: Nested foreach ? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-199673@lists.php.net to get a copy of this message | ||
On Sun, 2004-10-17 at 09:53 -0700, Stuart Felenstein wrote:
> I have 3 arrays. 3 for 3 fields in a table (all part
> of 1 record)
> array1 - field1
> array2 - field2
> array3 - field3
>
> What I've been doing which works good with one array:
> if ( is_array( $_SESSION['foo'] ) ) {
> foreach ( $_SESSION['foo'] as $x ) {
> sql .= "INSERT INTO TABLE (...............
> VALUES ($x)
>
> Just can't seem to figure out how with three arrays.
>
> help appreciated.
>
> Stuart
>
Can you provide a print_r() output of your $_SESSION['foo'] ?
I can help you more after that.
-Robby
--
/***************************************
* Robby Russell | Owner.Developer.Geek
* PLANET ARGON | www.planetargon.com
* Portland, OR | robby@planetargon.com
* 503.351.4730 | blog.planetargon.com
* PHP/PostgreSQL Hosting & Development
****************************************/
Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc
Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc