Re: [PHP] undefine variable

2008-08-19 Thread Jochem Maas
Michael S. Dunsavage schreef: On Sun, 2008-08-17 at 22:26 +0100, Ashley Sheridan wrote: Hi Michael, ... Heh, actually that wasn't the problem after all. Well php still yells @ me about it, but it does work. In fact someone on this list helped me before, sorry if I can't remember your name

Re: [PHP] undefine variable

2008-08-17 Thread Michael S. Dunsavage
On Sun, 2008-08-17 at 22:26 +0100, Ashley Sheridan wrote: > Hi Michael, > > It seems that you are trying to use the $selected_state variable in the > code, but it hasn't been declared yet. To test if a variable exists, you > can use the isset() function. > > Also, there is a quick way of writing

Re: [PHP] undefine variable

2008-08-17 Thread Ashley Sheridan
Hi Michael, It seems that you are trying to use the $selected_state variable in the code, but it hasn't been declared yet. To test if a variable exists, you can use the isset() function. Also, there is a quick way of writing your if/else check on one line. Here's the changes: foreach($state_list