Re: [PHP] Silly varible question

2006-07-13 Thread Jochem Maas
Ed Curtis wrote: > ... > > Thanks for all the help guys. I now have a better understanding of multi > dimensional arrays and can use it for what I'm trying to accomplish. This as Mary Poppins said 'php arrays are scrumptious'. > list is the greatest!! yeah we rule (the land of goblins, fair

RE: [PHP] Silly varible question

2006-07-13 Thread Ed Curtis
> Just make $item a 2-dimensional array, with the first diemnsion addressed by > $count; so: > > $item[$count][] = $_POST['phone']; > $item[$count][] = $_POST['category']; > $item[$count][] = $_POST['copy']; > $item[$count][] = $_POST['pic_style']; > $item[$count][] = $cost; > $item[

RE: [PHP] Silly varible question

2006-07-13 Thread Ford, Mike
On 13 July 2006 13:53, Ed Curtis wrote: > I know this is probably simple as all get out but it's early and I > can't find an answer anywhere after searching for a while > > > I need to assign a number to a variable and then use that variable > in a session to store an array. It's for a sho

Re: [PHP] Silly varible question

2006-07-13 Thread Dave Goodchild
On 13/07/06, Ed Curtis <[EMAIL PROTECTED]> wrote: I know this is probably simple as all get out but it's early and I can't find an answer anywhere after searching for a while I need to assign a number to a variable and then use that variable in a session to store an array. It's for a shop

Re: [PHP] Silly varible question

2006-07-13 Thread Jochem Maas
Brad Bonkoski wrote: > Why not just have another array... > > $bag = array(); > $item[] > > array_push($bag, $item); > > then store the bag in the session. > so, you would have count($bag) items in your shopping cart, and you > would be able to easily access them. > Just a thought, instead

Re: [PHP] Silly varible question

2006-07-13 Thread Brad Bonkoski
Why not just have another array... $bag = array(); $item[] array_push($bag, $item); then store the bag in the session. so, you would have count($bag) items in your shopping cart, and you would be able to easily access them. Just a thought, instead of munging variable names. -B Ed Curti

[PHP] Silly varible question

2006-07-13 Thread Ed Curtis
I know this is probably simple as all get out but it's early and I can't find an answer anywhere after searching for a while I need to assign a number to a variable and then use that variable in a session to store an array. It's for a shopping cart system I'm building. What I've got is: