Menu
Hello,
I can’t figure out why this doesn’t work. Because aren’t both ways exactly the same?
[code=php]
<?php
class checkBlog
{
var $id;
function __construct()
{
$this->id=$_GET[‘b’];
}
}
$checkBlog = new checkBlog();
?>
[code=php]
<?php
class checkBlog
{
var $id = $_GET[‘b’];
function __construct()
{
}
}
$checkBlog = new checkBlog();
?>
but with the second method:
[CODE]Parse error: syntax error, unexpected T_VARIABLE in
Thanks in common,
David