heredoc function

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

Untitled Document
{$setSingleService()}

START;
$db = NULL;
print <<< EINDE

EINDE; ?>[/php]

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


[php] print <<< START

Untitled Document

echo $test

[/php]

what do you mean ?

I really think you need to scrap that and start over.

I know I already used the function outside the heredoc scope and it works.

Sponsor our Newsletter | Privacy Policy | Terms of Service