---------- Post updated 05-04-12 at 07:39 AM ---------- Previous update was 05-03-12 at 11:33 PM ----------
Hi I have a small problem here...
the above code is working fine if the no of aplhabets in input variable is not multiple of 3... if it is mutliple of three then it places a comma at the end like this
case 1:
input : $var="A,B,C" //Only 3 alphabets
output: A,B,C, // comma not reqd at the end
expected : A,B,C
case2:
input : $var="A,B,C,D,E,F" // 6 alphabets
output: A,B,C, D,E,F, // comma not reqd at the end
expected : A,B,C, D,E,F // a white space after 3 alphabets
case 3:
input : $var="A,B,C,D,E,F,G,H" // not a multiple of 3
output: A,B,C, D,E,F, G,H // coming as expected
expected : same as output
pls help me to remove the comma coming at the end
---------- Post updated at 08:22 AM ---------- Previous update was at 07:39 AM ----------