[PHP] Re: Declare variables in advance question

2007-08-21 Thread Colin Guthrie
nitrox . wrote: I want to declare these variables Game_id and Member_id in advance. Following the suggestionfrom one of my books can I do something like this: $expected = array('Game_id', 'Member_id');foreach($expected AS $key) {if ( !empty($_POST[$key])) { ${$key} =

Re: [PHP] Re: Declare variables in advance question

2007-08-21 Thread Stut
Colin Guthrie wrote: nitrox . wrote: I want to declare these variables Game_id and Member_id in advance. Following the suggestionfrom one of my books can I do something like this: $expected = array('Game_id', 'Member_id');foreach($expected AS $key) {if ( !empty($_POST[$key])) {

Re: [PHP] Re: Declare variables in advance question

2007-08-21 Thread shiplu
use #php -s command to indend your source file On 8/21/07, Colin Guthrie [EMAIL PROTECTED] wrote: nitrox . wrote: I want to declare these variables Game_id and Member_id in advance. Following the suggestionfrom one of my books can I do something like this: $expected = array('Game_id',