@invisionauthorFeb 12.2008 — #Just to ask again, basically I need it so if the user selects and submits radio button 1, that a variable, say, $proofcomment will store the string value = "Please ammend and reproof"
@jasonahouleFeb 13.2008 — #or use an array [code=php] $proofEnum = array("Please ammend and reproof", "Please ammend and print", "Approve and Print"); $proofText = $proofEnum[$_POST['proof']]; [/code] Or you can create an enumeration (sort of). [code=php] ... class ProofEnum { public const REPROOF = 1; public const AMEND = 2; public const APPROVE = 3; } ... switch($_POST['proof']) { case ProofEnum::REPROOF: // do whatever you need to for "Please ammend and reproof" break; case ProofEnum::AMEND: // do whatever you need to for "Please ammend and print" break; case ProofEnum::APPROVE: // do whatever you need to for "Approve and Print" break; default: // the user didn't choose any of these } [/code] It all depends on what you are tying to do.
@jasonahouleFeb 13.2008 — #Yeah, it isn't really an enumeration but you have to work with what the language gives you. Like I said, I have no idea what he is trying to do.
I have actually created an enumeration class that has most of the functionality of an enumeration in say C# or Java. It is really quite useful.