Jump to content

gtener

New Members
  • Posts

    2
  • Joined

  • Last visited

gtener's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks, great idea! I will use an array!!!
  2. function emptyzipcode($request) { global $requestslimit,$postal1,$postal2,$postal3,$postal4,$postal5,$postal6,$postal7,$postal8,$postal9,$postal10; $string = '('; for ($x = $request+1; $x <= 9; $x++) { $string = $string . '!empty($postal' . $x . ') or '; } $string = $string . '!empty($postal10))'; $postal='postal'. $request; echo $string; echo "<br/><br/>"; echo $$postal; echo "<br/><br/>"; echo $postal2; if (empty($$postal) and $$string){ echo '<h2><font color="red">Failed!</font></h2>'; echo '<h3>Request #' . $request . ' Zip Code Empty!</h3>'; exit(); } } I want to able to use the variable $string as a condition in the if statement; for example $string="(!empty($postal5) or !empty($postal6) or !empty($postal7) or !empty($postal8) or !empty($postal9) or !empty($postal10))" Does anybody know how to do this? Thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.