<?php
$diasTexto = Array("Domingo", "Segunda", "Terça", "Quarta", "Quinta","Sexta","Sábado");
$data = new DateTime();
for ($i = 0; $i < 7; ++$i){
$diaSemana = $data->format("w");
$dias[$diaSemana] = $data->format("d-m-Y");
$data->add(new DateInterval('P1D'));
}
for ($i = 0; $i < 7; ++$i){
?>
<input type="checkbox" id="diasemana[]" name="diasemana[]" value="<?=$dias[$i]?>"><?=$diasTexto[$i]?><br>
<?php
}
PD9waHAKCSRkaWFzVGV4dG8gPSBBcnJheSgiRG9taW5nbyIsICJTZWd1bmRhIiwgIlRlcsOnYSIsICJRdWFydGEiLCAiUXVpbnRhIiwiU2V4dGEiLCJTw6FiYWRvIik7CgkkZGlhcyA9IEFycmF5KCk7CgkKCSRkYXRhID0gbmV3IERhdGVUaW1lKCk7CgoJCglmb3IgKCRpID0gMDsgJGkgPCA3OyArKyRpKXsKCQkkZGlhU2VtYW5hID0gJGRhdGEtPmZvcm1hdCgidyIpOwoJCSRkaWFzWyRkaWFTZW1hbmFdID0gJGRhdGEtPmZvcm1hdCgiZC1tLVkiKTsKCQkkZGF0YS0+YWRkKG5ldyBEYXRlSW50ZXJ2YWwoJ1AxRCcpKTsKCX0KCQoJZm9yICgkaSA9IDA7ICRpIDwgNzsgKyskaSl7CgkJPz4KPGlucHV0IHR5cGU9ImNoZWNrYm94IiBpZD0iZGlhc2VtYW5hW10iIG5hbWU9ImRpYXNlbWFuYVtdIiB2YWx1ZT0iPD89JGRpYXNbJGldPz4iPjw/PSRkaWFzVGV4dG9bJGldPz48YnI+CgkJPD9waHAKCX0=