I have a page in php to edit files, where you write the name in an input and select the extension by a select, at the time of conversion it happens the error "Array to string conversion". (Follow the code for analysis.)
if(isset($_POST['nome'])){
if(isset($_POST['ext'])){
$arquivo = "./Arquivos/".$_POST['nome'].".".$_POST['ext'];
} else{
$arquivo = "./Arquivos/".$_POST['nome'].".".['extension'];
}
$fp = fopen($arquivo,"w");
$fw = fwrite($fp,$_POST['texto']);
fclose($fp);
include $arquivo;
}