heredoc function

I have the following php file :


$db = new PDO(DBASE);

$setSingleService = ‘setSingleService’;

function setSingleService() {
$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

$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


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