List Info

Thread: note 56579 deleted from control-structures.switch by nlopess




note 56579 deleted from control-structures.switch by nlopess
user name
2006-05-31 18:57:10
Note Submitter: kenzy22  at yahoo dot com 

----

Here is a way to use switch to check arrays:

//Depending on Group
switch (TRUE) {
  case in_array('rma_tac', $userGroup):
    $home = "tac_home.php";
	break;
  case in_array('rma_vp', $userGroup):
    $home = "vpmgr_home.php";
	break;
  case in_array('rma_mgr', $userGroup):
    $home = "vpmgr_home.php";
	break;
  case in_array('rma_rma', $userGroup):
    $home = "rma_home.php";
	break;
  }

-- 
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )