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


Reply With Quote
Bookmarks