Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
|
Don't use a case statement. Case can only operate on an instantiated variable.
Use the if shorthand rather
PHP Code:
$variable=(isset($_GET['value'])?'something':'nothing';
Explaination:
$variable=({test returning true or false}?{value if true}:{value if false};
__________________
Only a biker knows why a dog sticks his head out the window.
|