RE: [PHP] if $index=1 how can I create a variable named $column_1

2001-05-11 Thread Arne Borkowski \(borko.net\)
OTECTED]] > Sent: Thursday, May 10, 2001 5:07 PM > To: Php-General > Subject: RE: [PHP] if $index=1 how can I create a variable named > $column_1 > > > And even though it's much less elegant than the > solution by Sean below, you could also use 'eval' >

RE: [PHP] if $index=1 how can I create a variable named $column_1

2001-05-10 Thread ..s.c.o.t.t.. [gts]
And even though it's much less elegant than the solution by Sean below, you could also use 'eval' $toast = array("wheat", "rye", "pumpernickel"); $numbreads = count($toast); for ($index = 0; $index < $numbreads; $index++) { eval("\$column$index = '$toast[$index]'; echo

Re: [PHP] if $index=1 how can I create a variable named $column_1 by appending $index behind $columnname

2001-05-09 Thread Paul Kozlenko
Strike that...I didn't read the question properly Paul Kozlenko "Paul Kozlenko" <[EMAIL PROTECTED]> wrote in message 9dd14a$gka$[EMAIL PROTECTED]">news:9dd14a$gka$[EMAIL PROTECTED]... > How about; > > list($column1, $column2, $column3) = array("wheat2", "rye2", > "pumpernickel2"); > > Not totaly

Re: [PHP] if $index=1 how can I create a variable named $column_1 by appending $index behind $columnname

2001-05-09 Thread Paul Kozlenko
How about; list($column1, $column2, $column3) = array("wheat2", "rye2", "pumpernickel2"); Not totaly flexible as below. But it satisfies the question. Needs php4. Paul Kozlenko "Jay Lepore" <[EMAIL PROTECTED]> wrote in message 9dcp7h$tjr$[EMAIL PROTECTED]">news:9dcp7h$tjr$[EMAIL PROTECTED]...

RE: [PHP] if $index=1 how can I create a variable named $column_1 by appending $index behind $columnname

2001-05-09 Thread Sean R. Bright
e required.) Sean > -Original Message- > From: Sean R. Bright [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, May 09, 2001 9:49 PM > To: 'Jay Lepore'; [EMAIL PROTECTED] > Subject: RE: [PHP] if $index=1 how can I create a variable named > $column_1 by appending $index beh

RE: [PHP] if $index=1 how can I create a variable named $column_1 by appending $index behind $columnname

2001-05-09 Thread Sean R. Bright
$toast = array("wheat", "rye", "pumpernickel"); $numbreads = count($toast); for ($index = 0; $index < $numbreads; $index++) { $temp = "column$index"; $$temp = $toasts[$index] } You will now have variables called column1, column2, and column3. Sean > -Original Message- >