RE: [PHP] makeing an array

2003-01-02 Thread Sean Malloy
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 count($comment); $i++) Is very bad

RE: [PHP] makeing an array

2003-01-02 Thread Ford, Mike [LSS]
-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 use if you want them

Re: [PHP] makeing an array

2003-01-02 Thread Gerald Timothy Quimpo
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].'br /'; } Why do you want to echo out $comment_1 ???

RE: [PHP] makeing an array

2003-01-02 Thread Ford, Mike [LSS]
-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. //

RE: [PHP] makeing an array

2003-01-01 Thread Sean Malloy
, 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); $i $x; $i++) { echo $comment[$i].'br /'; } Why do you

Re: [PHP] makeing an array

2003-01-01 Thread Timothy Hitchens \(HiTCHO\)
- 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++) { echo $comment[$i].'br /'; } or even faster: $i = count

[PHP] makeing an array

2002-12-31 Thread Philip J. Newman
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 ---

Re: [PHP] makeing an array

2002-12-31 Thread Timothy Hitchens \(HiTCHO\)
PROTECTED] Sent: Wednesday, January 01, 2003 2:57 PM Subject: [PHP] makeing an array 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

Re: [PHP] makeing an array

2002-12-31 Thread 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 = 'second', 3 = 'third'); You can now access these like so: echo $my_first_array[1]; etc etc of if you had

Re: [PHP] makeing an array

2002-12-31 Thread Timothy Hitchens \(HiTCHO\)
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 PM Subject: Re: [PHP] makeing an array So in saything that I