I have created an empty array above my foreach loop. I want to add my variable $filedir to my array until the foreach loop finish.
This is my code:
$fileopslag = array();
foreach($searchdoc as $searchdocument){
$filedir = 'd:\Documentatie/'.$searchdocument->pagename;
$fileopslag = $filedir;
}
When I do this, it adds the variable one time to my array.
When I show my output with var_dump, I see this:
"string(23) "d:\Documentatie/16.html", one string, but not a list.