I am quite a newbie at PHP, but I am trying to write a piece of code that will do something IF the zip-code is true,
ELSE do something else if false.
However, I have a list of about 50 local zip-codes to use.
if($stZip == 33762){
$locDeliv = $inpOpts['loc_ch_av'];
}else {
$locDeliv = $inpOpts['loc_unch_av'];
}
Works well, but I need to include multiple zip-codes.
$zips[]= "33762";
$zips[]= "33716";
$zips[]= "33634";
if($stZip == $zips){
$locDeliv = $inpOpts['loc_ch_av'];
}else {
$locDeliv = $inpOpts['loc_unch_av'];
}
The above code does NOT work, and only displays the variable $zips (not an actual zip-code)
Any thoughts?

New Topic/Question
Reply



MultiQuote









|