Immagino che ti serva in una pagina di aggiornamento.
Supponendo che tu abbia 5 checkbox di nome scelte[] e value rispettivamente pari a 1,2,3,4 e 5:
dove $scelte ovviamente contiene i valori checkati.Codice PHP:
for ($i=1; $i<=5; $i++)
{
if (in_array($i,$scelte))
echo "<input type=\"checkbox\" name=\"scelte[]\" value=\"$i\" checked>";
else
echo "<input type=\"checkbox\" name=\"scelte[]\" value=\"$i\">";
}