I have the following table as an example:
data - chave primaria, contendo a data mesmo 2018-01-02.
diasemana - int, contendo o dias das semana tipo 1 para segunda, 2 para terça.
semanaAno - int, contendo o numero de semana do ano tipo 1 primeira semana do ano.
So I have:
<?php
$repetiacao = 3;
for ($i = 0; $i <= $repetiacao ; $i++) {
// aqui está o problema
}
?>
"Here's the problem": I wanted every loop to repeat the date, for example 2018-01-02 on the first loop after 2018-02-02 on the second and last 2018-03-02 on according to the amount of repetition
As you can see, it raises the MONTH for each repetition but still my echo
I need it to be the semanaAno
field of my table. So I came to the logic more or less that in each loop I make a select
in the table showing semanaAno
when data = data
. Can you help me?