Hi,
I have a form that sends values (from 1-10), which are then imploded and separated by a ','. However, I need to be able to insert a ',' in place of a missing value: -
ie. if 1,2 and 3 are selected => 1,2,3 is returned
if 1,2,3 and 5 are selected => 1,2,3,,5 is returned.
The array can be up to 10, so if 1 and 10 are selected 1,,,,,,,,,10 is returned, etc.
I know it should be along the lines of having another array (as default with all numbers), and match the posted array against the default, replacing a non existent extry with a comma, but I just don't know the code 🙂
It's the best way to fix this thing as i can see (the explode goes wierd applying a $sel (checked) value to checkboxes if the total length of the array doesn't equal the number of checkboxes).
Thanks for any help in advance.