check size of an array
Posted: Tue Nov 25, 2008 4:36 am
I need to check size of an array which is in this format : $dref="score1;score2;score3;score4";
I need to check the size of this array if the score2,score3,score4 are empty return me 1 if score3,score4 are empty return me 2 , meaning to check how many of scores are having value.
like -> $dref="19;;;; "; = return me 1
$dref="19;18;;; "; =return me 2
$dref="19;18;40;; "; = return me 3
$dref="19;18;40;50; "; = return me 4(all)
I need to check the size of this array if the score2,score3,score4 are empty return me 1 if score3,score4 are empty return me 2 , meaning to check how many of scores are having value.
like -> $dref="19;;;; "; = return me 1
$dref="19;18;;; "; =return me 2
$dref="19;18;40;; "; = return me 3
$dref="19;18;40;50; "; = return me 4(all)