I want to pass the value in an array with (:). I have values to I need to pass the value in array index and I need to use : and then encode/decode it but I am not able to do.
what I am trying but it not working for me:
$countArray = array("21F:22M:23F","31M:32F:33M","41F:42M:43M");
I want to pass the value like above line
$val1 = 21F;
$val2 = 22M;
$val3 = 23F;
$val4 = 31M;
$val5 = 32F;
$val6 = 33M;
$val7 = 41F;
$val8 = 42M;
$val9 = 42M;
I want something like:
$countArray =
array("$val1:$val2:$val3","$val4:$val5:$val6","$val7:$val8:$val9");
So that I can get the output like:
21F:22M:23F,31M:32F:33M,41F:42M:43M