(sorry if im posting this in the wrong section) ok i know how to do the custom actions, but what i am wonding is if there is a way to use switch case in side of it i have tired i have tired the following codes to test but only the else{} is working..
if statement style
<?php
if ($var == 1) {
printf('one');
} elseif ($var == 2) {
printf('two');;
}
else
{
printf('nothing');
}
?>
<?php
if (isset($HTTP_GET_VARS['action'])) {
$action = $HTTP_GET_VARS['action'];
switch($action) {
case "1":
printf('one');
break;
case "2":
printf('two');
break;
}
}
else
{
printf('nothing');
}
?>
any ideas on this?
http://www.simplemachines.org/community/index.php?topic=75193.0