On 3/12/2013 9:04 PM, Angela Barone wrote:
On Mar 12, 2013, at 5:16 PM, David Robley wrote:
Presumably there is a fixed list of State - those are US states? -
so why not provide a drop down list of the possible choices?
There is, but the problem must have been that if someone
On Wed, Mar 13, 2013 at 5:07 PM, Jim Giner jim.gi...@albanyhandball.comwrote:
On 3/12/2013 9:04 PM, Angela Barone wrote:
On Mar 12, 2013, at 5:16 PM, David Robley wrote:
Presumably there is a fixed list of State - those are US states? -
so why not provide a drop down list of the possible
On Mar 13, 2013, at 9:07 AM, Jim Giner wrote:
Why not just check if the $state exists as a key of the array $states before
doing this?
Jim,
Are you thinking about the in_array function?
Angela
On Thu, Mar 14, 2013 at 12:18 AM, Angela Barone ang...@italian-getaways.com
wrote:
On Mar 13, 2013, at 9:07 AM, Jim Giner wrote:
Why not just check if the $state exists as a key of the array $states
before doing this?
Jim,
Are you thinking about the in_array function?
Angela
On Mar 13, 2013, at 4:24 PM, Matijn Woudt wrote:
That wouldn't work, in_array checks the values, and your states are in the
keys. Use:
if(isset($states[$state]))
Hi Matijn,
Before I received your email, I ran across if(array_key_exists) and it
seems to work. How does that differ
On Wed, Mar 13, 2013 at 4:44 PM, Angela Barone
ang...@italian-getaways.comwrote:
I ran across if(array_key_exists) and it seems to work. How does that
differ from if(isset($states[$state]))?
Hi Angela,
isset() will return false for an array key 'foo' mapped to a null value
whereas
2013/3/14 David Harkness davi...@highgearmedia.com
On Wed, Mar 13, 2013 at 4:44 PM, Angela Barone
ang...@italian-getaways.comwrote:
I ran across if(array_key_exists) and it seems to work. How does that
differ from if(isset($states[$state]))?
Hi Angela,
isset() will return false for
On Wed, Mar 13, 2013 at 5:10 PM, Sebastian Krebs krebs@gmail.comwrote:
Because 'null' is the representation of nothing array_key_exists() and
isset() can be treated as semantically equivalent.
As I said, these functions return different results for null values. It
won't matter for Angela
2013/3/14 David Harkness davi...@highgearmedia.com
On Wed, Mar 13, 2013 at 5:10 PM, Sebastian Krebs krebs@gmail.comwrote:
Because 'null' is the representation of nothing array_key_exists() and
isset() can be treated as semantically equivalent.
As I said, these functions return
On Mar 13, 2013, at 5:02 PM, David Harkness wrote:
isset() will return false for an array key 'foo' mapped to a null value
whereas array_key_exists() will return true. The latter asks Is this key in
the array? whereas isset() adds and is its value not null? While isset()
is
I've been getting the following error for awhile now, but I can't
figure out why it's happening:
Invalid argument supplied for foreach() in ... sample.php on line 377
Here's that portion of code:
include(states_zipcodes.php);
// Check if Zip Code matches from states_zipcodes
Am 12.03.13 20:45, schrieb Angela Barone:
I've been getting the following error for awhile now, but I can't
figure out why it's happening:
Invalid argument supplied for foreach() in ... sample.php on line 377
Here's that portion of code:
include(states_zipcodes.php);
//
On Mar 12, 2013, at 2:26 PM, Marco Behnke wrote:
what is in $states?
Looks like $states[$state] is not an array.
Here's a sample:
?php
$states = array(
'AL' = array( '350','351','352','353', ),
'AK' = array( '995','996','997','998','999', ),
'AZ' = array(
$states = array(
'AL' = array( '350','351','352','353', ),
'AK' = array( '995','996','997','998','999', ),
'AZ' = array( '850','851','852','853','854', ),
...
'WI' = array( '530','531','532', ),
'WY' = array( '820','821','822','823','824', ),
);
?
Seeing
I think I figured it out.
?php
$states = array(
'AL' = array( '350','351','352','353', ),
'AK' = array( '995','996','997','998','999', ),
'AZ' = array( '850','851','852','853','854', ),
'WI' = array( '530','531','532', ),
'WY' = array( '820','821','822','823','824',
Angela Barone wrote:
I think I figured it out.
?php
$states = array(
'AL' = array( '350','351','352','353', ),
'AK' = array( '995','996','997','998','999', ),
'AZ' = array( '850','851','852','853','854', ),
'WI' = array( '530','531','532', ),
'WY' = array(
On Mar 12, 2013, at 5:16 PM, David Robley wrote:
Presumably there is a fixed list of State - those are US states? -
so why not provide a drop down list of the possible choices?
There is, but the problem must have been that if someone didn't select
a State, $state was blank. I've
17 matches
Mail list logo