ppgsalomao Posted February 5, 2004 Report Share Posted February 5, 2004 Como fazer para tirar apenas o que quero de um array ??Tentei com array_splice mas não consegui !O Código//Recebe os CheckBox$check0 = $HTTP_POST_VARS['check0'];$check1 = $HTTP_POST_VARS['check1'];$check2 = $HTTP_POST_VARS['check2'];$check3 = $HTTP_POST_VARS['check3'];$check4 = $HTTP_POST_VARS['check4'];$check5 = $HTTP_POST_VARS['check5'];$check6 = $HTTP_POST_VARS['check6'];$check7 = $HTTP_POST_VARS['check7'];$objs = array("0","1","2","3","4","5","6","7");if (!isset($check0)) {$objs = array_splice($objs, 0, 1);$join = join(",",$objs);echo $join;}if (!isset($check1)) {$objs = array_splice($objs, 1, 1);$join = join(",",$objs);echo $join;}if (!isset($check2)) {$objs = array_splice($objs, 2, 1);$join = join(",",$objs);echo $join;}if (!isset($check3)) {$objs = array_splice($objs, 3, 1);$join = join(",",$objs);echo $join;}if (!isset($check4)) {$objs = array_splice($objs, 4, 1);$join = join(",",$objs);echo $join;}if (!isset($check5)) {$objs = array_splice($objs, 5, 1);$join = join(",",$objs);echo $join;}if (!isset($check6)) {$objs = array_splice($objs, 6, 1);$join = join(",",$objs);echo $join;}if (!isset($check7)) {$objs = array_splice($objs, 7, 1);$join = join(",",$objs);echo $join;}E não da certo !!Como faço ?? Quote Link to comment Share on other sites More sharing options...
0 Eddie_666 Posted February 5, 2004 Report Share Posted February 5, 2004 não entendi o teu questionamento..normalmente tu pega array[posicao] Quote Link to comment Share on other sites More sharing options...
0 gladiador Posted February 6, 2004 Report Share Posted February 6, 2004 /* Num é nisso ai salomão ta em outra parte , ainda não resolveu */ Quote Link to comment Share on other sites More sharing options...
Question
ppgsalomao
Como fazer para tirar apenas o que quero de um array ??
Tentei com array_splice mas não consegui !
O Código
E não da certo !!
Como faço ??
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.