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
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
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++) {
$
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
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
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
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'
7 matches
Mail list logo