I'm trying to retrieve the attachment names in a single variable and then print them all together. Note that each file is already uploaded to the upload folder. So this is not the case. I really just want to retrieve the names of those attachments, that's all. How to do this? These attachments see from an imput file multiple then in a loop sending all the files to the upload folder successfully. But I want to take advantage of the loop to retrieve the name.
<?php
$arquivo = isset($_FILES['foto']) ? $_FILES['foto'] : FALSE;
for ($k = 0; $k < count($arquivo['name']); $k++){
$destino = $diretorio."/" . date("d.m.Y-H.i.s"). $arquivo['name'][$k];
$acumulaNome = ; // Como ficaria esta variavel que acumula os nomes apenas?
if (move_uploaded_file($arquivo['tmp_name'][$k], $destino)) {echo "Sucesso"; }
else {echo "erro";}
}
?>