I'm making a system a bit like a calendar / schedule. In it I have a semestre
table that has a data de incio
field and a data fim
field and I need to scroll through those dates by printing the name of each day in the head
of a table and a button for each of those days so that the user can register a new entry that day or not.
How to go through these days? I've tried foreach
but it did not work, I also tried logic with for
and I could not ...
Some of the code I've done so far:
if(!isset($_SESSION)) {
session_start();
}
$idSemestre = $_SESSION['SemestreGeral'];
$oSemestre = new semestresclass();
$oSemestre -> listarEdicao($idSemestre);
$array = mysql_fetch_array($oSemestre->retorno());
$start_date = $array['DataDeInicio'];
$end_date = $array['DataDeTermino'];
$dataInicio = strtotime($start_date);
$dataFim = strtotime($end_date);
foreach ?????????????????????