I'm trying to create an .html file using PHP, and filling it with the content of an array, but I can't create the html file. Here's my function:
function viewPag(){
session_start();
$handler=fopen("view.php", 'w+');
for ($i=0; $i < count($_SESSION["Text"]); $i++) {
fwrite($handler,$_SESSION["Text"][$i]);
}
fclose($handler);
header("Location: view.php");
}