Re: Can't get this code to work...

From: Date: Sat, 06 Apr 2002 02:42:37 +0000
Subject: Re: Can't get this code to work...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-91831@lists.php.net to get a copy of this message
Hey Rob: On Fri, Apr 05, 2002 at 08:31:15PM -0800, Rob Packer wrote: > if ("\$checkbox".$cb[$i]=="validate") > {echo"can NOT get here";// HINT, HINT Because you're making a string "$checkboxName" Of course it doesn't equal "validate" If you want to evaluate the variable $checkboxName, you need to write: $var = "checkbox$cb[$i]"; if ($$var == 'validate') But, of course, that assumes you actually set the name of your checkbox to "checkboxName" and the value of that checkbox to "validate" Enjoy, --Dan -- PHP scripts that make your job easier http://www.analysisandsolutions.com/code/ SQL Solution | Layout Solution | Form Solution T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Ave, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409

« previous php.general (#91831) next »