RE: [PHP] while-do +array
- From: robert@xxxxxxxxxxxxx (Robert Cummings)
- Date: Wed, 31 Oct 2007 10:28:41 -0400
On Wed, 2007-10-31 at 16:20 +0200, Steven Macintyre wrote:
Your subject line says "while-do" + array, following code contains
a
"do-while" loop.
Apologies :)
We can't debug the script very well without a
sample
input since we don't know how many times the loop "should" run. To
debug
yourself, try using print_r() to see exactly what the following
line of
code produces:
$options = explode(",", $armbase);
Array ( [0] => 4200_side_frame.jpg [1] => 4220_integral_frame.jpg [2] =>
flamingo_pu_armrest.jpg [3] => flexible_pu_armrest.jpg [4] =>
futura_standard_sleigh_base.jpg [5] => futura_universal_sleigh_base.jpg )
That's the output ... so the array is definitely ok ...
Yeah the last comment in my response detailsed your problem. Namely that
list() has no return value so the loop ends when it's return value is
checked since null juggles to false in boolean context.
Cheers,
Rob.
--
............................................................
SwarmBuy.com - http://www.swarmbuy.com
Leveraging the buying power of the masses!
............................................................
.
- References:
- while-do +array
- From: "Steven Macintyre"
- Re: [PHP] while-do +array
- From: Robert Cummings
- RE: [PHP] while-do +array
- From: "Steven Macintyre"
- while-do +array
- Prev by Date: RE: [PHP] while-do +array
- Next by Date: Re: [PHP] RE: Reaching the PHP mailing list owners
- Previous by thread: RE: [PHP] while-do +array
- Next by thread: Re: [PHP] while-do +array
- Index(es):