2
Type I want to generate an array like this.
array('nome1', 'nome2', 'nome3',)
what I have is the $name string, how do I generate the above array ?
would be something like
array($nome)
??
my code
if (!empty($_FILES['files'])) {
$string = str_replace(' ', '-', $len);
$new_name = convert_accented_characters($string);
for($i = 0; $i < $len; $i++) {
$fileSize = $_FILES['userfile']['name'][$i];
$string = str_replace(' ', '-', $fileSize);
$new_name = convert_accented_characters($string);
echo $new_name.'<br/>';
}
//Configure upload.
$this->upload->initialize(array(
"file_name" => array($new_name),
"upload_path" => './public/uploads/album/'. $past_date .'/'. $pasta .'/',
"allowed_types" => "mp3",
"max_size" => "2194304000"
));
Can you explain further what you want? It means that you have one/several variables with string values saved and you want to put these strings/variables inside an array?
– Sergio
What is the content of your variable
$nome
?– Rodrigo Rigotti
yes, exactly that @Sergio
– Uellington Palma
filename of an input @Rodrigorigotti
– Uellington Palma
@Uellingtonpalma put an answer. That’s what I was looking for?
– Sergio