I have the following php file :
[php]require_once("…/.common/.init.php");
$db = new PDO(DBASE);
$setSingleService = ‘setSingleService’;
function setSingleService() {
extract($GLOBALS);
$result = $db->query(“SELECT * FROM AanbodSpul ORDER BY id DESC”);
$test = “dit is een test”;
foreach($result as $row)
{
echo $test;
}
}
print <<< START
{$setSingleService()} |
START;
$db = NULL;
print <<< EINDE
I want the $test variable to be written inside the table cell. But as you can see in the picture it is written outside the table cell.
does somebody know a solution ?
thanks in advance