This is the function makeMenu that I what to write to the file.
function makeMenu($parent=0)
{
$getPages = mysql_query("SELECT ID, name, link FROM menu WHERE parent='".$parent."' UNION SELECT ID, name, link FROM prod WHERE parent='".$parent."' AND aktiv = 1 ") or exit(mysql_error());
$list = "Start of string";
if (mysql_num_rows($getPages) > 0)
{
while ($res = mysql_fetch_assoc($getPages))
{
//make $list
$list .= "chunk";
$list .= "more_chunks";
}
}
return $list;
}
Now when I checked I noticed that the string Test was written to the file.