Hello,

see this bit of code:

<?php

class Test {
var $one = array('1','2','3');
var $two = '4';
}

$Test = new Test;

// this does not print the value of the array:
echo <<<EOT
blablabla<br>
$Test->one[0]<br>
more blablabla<br>
$Test->two<br><br>
EOT;

// but this prints it perfectly:
print $Test->one[0];
print "<br>\n";
print $Test->two;

?>

$Test->two works well in both examples, but why does the array-variable $Test->one[0] not get printed out correctly using echo<<<EOT ???

thanx,

Yves

    Write a Reply...