Hi everyone, it seems like I´ve got into trouble again...
I'm trying to make a function or several functions that prints any type of info that a named variable contains.
I started out like this:
<?
$OUTPUT = array();
function mm_output ($line)
{
global $OUTPUT;
array_push($OUTPUT,$line);
}
function mm_flush_output ()
{
global $OUTPUT;
foreach($OUTPUT as $line)
echo $line."\n";
$OUTPUT = array();
}
mm_output("What ever...");
?>
but all I get is an empty page :-(
What I'm doing wrong (or right) here ?
To be more specific:
I want the function mm_output to print whatever the variable $line contains so I vac do a search in a db and then just print the answer to a webpage.
The data in the variable will be different almost every time...
I'm greatful for any kind of help from all you gurus out there.
Kind regards: Mikael