For example. I'm working with Heredoc and whenever I need to do a for , I have to close Heredoc to do the for then reopen the tag mentioned.
Is there any way to query a variable within the for which will return all results to me? For example:
$telefones = 3;
for($i = 0; $i < $telefones; $i++) {
$numero_tel = $buscar_telefones[$i]['numero'];
$todosNumeros = "telefone: $numero_tel";
}
echo <<< EOT
$todosNumeros
EOT;
PRINT: phone: 9999-9999 phone: 9999-7777 phone: 9999-8888
Thank you!