Re: [PHP] while-do +array

2007-10-31 Thread Robert Cummings
On Wed, 2007-10-31 at 13:02 +0200, Steven Macintyre wrote: Hiya, I have the following code ... which only seems to result in one item ... which is incorrect ... can anyone spot my problem? Your subject line says while-do + array, following code contains a do-while loop. We can't debug the

RE: [PHP] while-do +array

2007-10-31 Thread Steven Macintyre
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

RE: [PHP] while-do +array

2007-10-31 Thread Robert Cummings
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

Re: [PHP] while-do +array

2007-10-31 Thread Robin Vickery
On 31/10/2007, Steven Macintyre [EMAIL PROTECTED] wrote: Hiya, I have the following code ... which only seems to result in one item ... which is incorrect ... can anyone spot my problem? if ($armbase != ) { $options = explode(,, $armbase); $text .=

Re: [PHP] While on array?

2002-01-21 Thread anders nawroth
ie - i have: while($myrow=mysql_fetch_array($result)) { etc... But i want the loop to run with an array i created earlier ($anotherarray = [key1] = value1, [key2] = value2). use foreach($anotherarray as $key = $value) { . A Nawroth -- PHP General Mailing List

Re: [PHP] While on array?

2002-01-20 Thread Bogdan Stancescu
You should probably take a look at each() for that... The functionality is not the same but it's the only answer I can think of for your question (i.e. mysql_fetch_row() _returns_ a key-value array while each() _walks_ a key-value array). Bogdan Daniel Alsén wrote: Hi, i am fiddling with a