Re: [PHP] Re: adding info to an array?

2002-08-01 Thread Jason Wong
On Friday 02 August 2002 06:30, Hawk wrote: > hahahaha, that was so stupid of me... should have put if (! $ra) { $ra = > array(); } but I seemed to have missed this.. lol :P > thanks for your help and sorry for being an idiot ;D It's better to initialise $ra outside of the for-loop. -- Jason W

[PHP] Re: adding info to an array?

2002-08-01 Thread Hawk
hahahaha, that was so stupid of me... should have put if (! $ra) { $ra = array(); } but I seemed to have missed this.. lol :P thanks for your help and sorry for being an idiot ;D "Hawk" <[EMAIL PROTECTED]> skrev i meddelandet [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I'm a newbie at php, so

[PHP] Re: adding info to an array?

2002-08-01 Thread Hawk
I'm a newbie at php, so dont tease me ;P first I have to input fields for $group and $amount and a textarea where you enter bla,blah,blabla etc $total = $amount*$group-1; $da = split (",", $textarea); for ($a = 1; $a <= $group; $a++) { print "Group $a:"; for ($b = 1; $b <= $amount; $b++) { $

Fw: [PHP] Re: adding info to an array?

2002-08-01 Thread Kevin Stone
uot;); array_push($ra, "mysecondvalue"); echo $ra[1]; -- -Kevin ----- Original Message - From: "Hawk" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, August 01, 2002 3:17 PM Subject: [PHP] Re: adding info to an array? > Tried that now, and with

[PHP] Re: adding info to an array?

2002-08-01 Thread Aaron
can we see the code? -aaron "Hawk" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Tried that now, and with the same results > print_r($ra); still only shows the last info inserted in the array :/ > > "Aaron" <[EMAIL PROTECTED]> skrev i meddelandet > [EMAIL PR

[PHP] Re: adding info to an array?

2002-08-01 Thread Hawk
Tried that now, and with the same results print_r($ra); still only shows the last info inserted in the array :/ "Aaron" <[EMAIL PROTECTED]> skrev i meddelandet [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > just assign the value to $ra[] > > > "Hawk" <[EMAIL PROTECTED]> wrote in message > [EMAIL

[PHP] Re: adding info to an array?

2002-08-01 Thread Aaron
just assign the value to $ra[] "Hawk" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I have a for loop, and an if that checks something, and if true, it's > supposed to add info to an array called $ra, but instead of adding it to the > array it seems like it'