<?
class ForumClass
{
var $Title, $Body;
function ForumClass()
{
$this->$Title = "Titel";
$this->$Body = "Kropp";
}
function Title()
{
echo $this->$Title;
}
function Body()
{
echo $this->$Body;
}
}
$Forum = new ForumClass;
?>
<html>
<head>
<title><?php $Forum->Title() ?></title>
</head>
<body>
<?php $Forum->Body() ?>
</body>
</html>
Denna kod hanterar båda variablerna som SAMMA variabel och skriver därför ut samma sak som både titel och kropp. Har även provat att deklarera $Title och $Body på egna rader men det hjälper inte.
Bugg?
------------------
/mvh Swey
Programmera PHP