[PHP] Variable next to variable question...

2001-07-11 Thread Jeff Lewis
Looks like I should have been keeping a close eye on that thread... I am pulling fields from a database and displaying them on my page. I am adding a checkbox next to the name and storing the name in the checkbox value. Anyway, on submission I want to process them but am having problems... p

RE: [PHP] Variable Next To Variable?

2001-07-11 Thread scott [gts]
ldren( $C_Last ); if you used individual variables, you could not do that in any easy or efficient way. > -Original Message- > From: Jeff Oien [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, July 11, 2001 1:29 PM > To: PHP > Subject: FW: [PHP] Variable Next To Variable? > >

RE: [PHP] Variable Next To Variable?

2001-07-11 Thread Matthew Luchak
how about : if ((isset($number ))&&($number <= $max)){ while ($number > 0;$number -- ) { echo 'Last Name';} } if you're not crazy about having the fields labled in reverse order you could push to an array and then arsort the array. Ma

RE: [PHP] Variable Next To Variable?

2001-07-11 Thread Chadwick, Russell
fills out 8 for the max, and then only ends up filling in C_Last_Name1, C_Last_Name4, C_Last_Name7 you wont have to worry about it. -Original Message- From: Jeff Oien [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 10:29 AM To: PHP Subject: FW: [PHP] Variable Next To Variable

FW: [PHP] Variable Next To Variable?

2001-07-11 Thread Jeff Oien
; $Number_Children = 5; > $i = $Number_Children; > while ($i--) { > if (! $Children_Last[$i]) { > // code > } > } > > > -----Original Message- > > From: Jeff Oien [mailto:[EMAIL PROTECTED]] > > Subject: [PHP] Variable Next To Variabl

RE: [PHP] Variable Next To Variable?

2001-07-11 Thread Chadwick, Russell
I think you want if (!(${"C_Last_Name$y"})) { or if (!(${"C_Last_Name".$y})) { -Original Message- From: Jeff Oien [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 10:22 AM To: PHP Subject: RE: [PHP] Variable Next To Variable? I like this idea but it

RE: [PHP] Variable Next To Variable?

2001-07-11 Thread Jeff Oien
I like this idea but it's giving me a parse error on this code: if (!{$C_Last_Name}{$y}) I'm looking at the other ideas also. Jeff Oien > > if (!$C_Last_Name$y) { > > The form submitting information to this code has field name like > > C_Last_Name1 C_Last_Name2 depending on how many Child

Re: [PHP] Variable Next To Variable?

2001-07-11 Thread Francis Fillion
You could use an array: like Way better this way and you oculd do: $y=1; while($y > Sorry if this has been brought up 100 times. > > I want to do this: > > $y = "1"; > > while ($y <= "$Number_Children") { > if (!$C_Last_Name$y) { > error stuff; > $

RE: [PHP] Variable Next To Variable?

2001-07-11 Thread scott [gts]
--) { if (! $Children_Last[$i]) { // code } } > -Original Message- > From: Jeff Oien [mailto:[EMAIL PROTECTED]] > Subject: [PHP] Variable Next To Variable? > > > Sorry if this has been brought up 100 times. > I want to do this: > &g

RE: [PHP] Variable Next To Variable?

2001-07-11 Thread Boget, Chris
> if (!$C_Last_Name$y) { > The form submitting information to this code has field name like > C_Last_Name1 C_Last_Name2 depending on how many Children > are signing up for something. So I need $y to represent the number. You want this: if (!{$C_Last_Name}{$y}) { The {} surrounding the var

[PHP] Variable Next To Variable?

2001-07-11 Thread Jeff Oien
Sorry if this has been brought up 100 times. I want to do this: $y = "1"; while ($y <= "$Number_Children") { if (!$C_Last_Name$y) { error stuff; $y++; } } The form submitting information to this code has field name like C_Last_Name1 C_Last_Name2