[thelist] PHP + variables

Mark Joslyn mark.joslyn at solimarsystems.com
Fri Mar 15 15:27:00 CST 2002

I have 80+ variables being sent from a form to a PHP file that verifies if
the value of the variable is set to "yes". If it is, then the PHP file
prints the variable - if not, then it does not print. Right now, I have 80+
if statements like this:

$myAS400_Twinax = $AS400_Twinax;
if ($myAS400_Twinax == "yes"){
	$myAS400_Twinax = "\n  Twinax: YES";

  - one for each variable. There has to be a better way. Any suggestions?

It works right now, but the code seems inefficient.

Any help is appreciated.



More information about the thelist mailing list