I'm not sure I know what you mean...
"My problem is how should I retrieve the data back from mysql to check boxes? "
What exactly do you want to do with all the checked boxes?
Anyways, you can use the explode function to take the string and split it up into an array:
$myarray = explode("&" , $string);
now $myarray[0] == "o[1]=checked"
You might just want to take only the checked boxes and put them into the string, instead of everything. Like if o[1] is checked, put the number 1 in the string, and if o[2] is checked, put the number 2 in the string, and if o[3] wasn't checked, you wouldnt put 3 in the string. So the string might look like this:
$string = "1,2,4,7,9,10,40,...500"
It has all the indexes of the checked boxes.
It wont be as long that way. But I don't really understand what you want to do so..I don't really know how to help you.
If you want to print out the checked boxes like they were written before, you could use the string example above and just write a for loop:
$array = explode("," , $string);
for ($i=0; $i<(sizeof($array)); $i++){
echo "o[$array[$i]]=\"checked\"";
}
...I think that works..hmmm