1
How to Catch Results inside the loop and grouping into a variable outside it Example:
$sql55 = "SELECT * FROM finan WHERE MONTH(data_fechamento)= '02' ";
$resultado55 = mysql_query($sql55) or die( mysql_error());
while ($row55 = mysql_fetch_assoc($resultado55)) {
echo '<br>';
echo $vencimento2 = $row55['vencimento'];
// retorno echo 2017-02-02
2017-02-04
2017-02-05
2017-02-03
}
// queria pegar esse mesmo daros em uma variaval fora do while
echo $juntandoresultados; // exmplo
//////////////////////////////////////////////////////////////////////
For your answer to be perfect is only missing put $joining results=""; before the while. 'Cause the way it is, spending the first time in the while will make an error that the variable $joining results does not exist.
– Antonio Alexandre
beauty, I’ve already put
– user60252
Mark the answer as chosen :)
– user60252