> -Original Message-
> From: Gerald Timothy Quimpo [mailto:[EMAIL PROTECTED]]
> Sent: 02 January 2003 14:12
>
> alternatively, if you don't want to change to array syntax,
> you can use
> variable variables. e.g.,
>
> $variable_name="comment_".nIndex; // now comment_1, for example.
On Wednesday 01 January 2003 01:41 pm, Timothy Hitchens (HiTCHO) wrote:
> Use the count like following inside to ensure that you don't
> call on a non existent index.
>
> for ($i = 0, $x = count($comment); $i < $x; $i++)
> {
> echo $comment[$i].'';
> }
>
> Why do you want to echo out $comment_1
> -Original Message-
> From: Sean Malloy [mailto:[EMAIL PROTECTED]]
> Sent: 02 January 2003 13:35
> To: Timothy Hitchens (HiTCHO); [EMAIL PROTECTED]
> Subject: RE: [PHP] makeing an array
>
>
> see example 2.
But that produces the elements in reverse order -- no
see example 2.
> -Original Message-
> From: Timothy Hitchens (HiTCHO) [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 1 January 2003 11:00 PM
> To: Sean Malloy; [EMAIL PROTECTED]
> Subject: Re: [PHP] makeing an array
>
>
> Your example of:
>
> for ($i = 0; $i &
ort
- Original Message -
From: "Sean Malloy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 01, 2003 9:40 PM
Subject: RE: [PHP] makeing an array
> why the $x variable aswell?!
>
> for ($i = 0; $i < count($comment); $i++)
> {
> e
TECTED]]
> Sent: Wednesday, 1 January 2003 4:41 PM
> To: Philip J. Newman; [EMAIL PROTECTED]
> Subject: Re: [PHP] makeing an array
>
>
> Use the count like following inside to ensure that you don't
> call on a non existent index.
>
> for ($i = 0, $x = count($comment);
Open Platform Web Development
Consulting - Outsourcing - Training - Support
- Original Message -
From: "Philip J. Newman" <[EMAIL PROTECTED]>
To: "Timothy Hitchens (HiTCHO)" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Wednesday, January 01, 2003 3:29 P
hens (HiTCHO)" <[EMAIL PROTECTED]>
To: "Philip J. Newman" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, January 01, 2003 6:12 PM
Subject: Re: [PHP] makeing an array
> Example of an Array:
>
> $my_first_array = array(1 => 'first', 2 =
Open Platform Web Development
Consulting - Outsourcing - Training - Support
- Original Message -
From: "Philip J. Newman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 01, 2003 2:57 PM
Subject: [PHP] makeing an array
> Can someone help me make
Can someone help me make an array ...
I have $foo amount of loops to preform (1-20), and would like to make the
veriable work for me like $comment_1, $comment_2 etc etc.
http://nz.php.net/manual/en/function.array.php makes no sence to me after i
read it and read it ...
help me please
---
Philip
10 matches
Mail list logo