Closed Thread Icon

Topic awaiting preservation: PHP Class hellp (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=31027" title="Pages that link to Topic awaiting preservation: PHP Class hellp (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: PHP Class hellp <span class="small">(Page 1 of 1)</span>\

 
Hustluz
Nervous Wreck (II) Inmate

From:
Insane since: Jun 2003

posted posted 05-30-2009 23:54

here is my code

code:
class Example {
	
	public var $a = 1;
	protected var $b 	= 2;
	private var $c 		= 3;
	
	function show_abc(){
		echo $this->a;
		echo $this->b;
		echo $this->c;

	}
}



and the error im getting is this

Parse error: parse error, expecting `T_VARIABLE' in C:\wamp\www\digiblueprint\index.php on line 5

my syntax seems to be right any idea what im doing wrong please help

Hustluz
Nervous Wreck (II) Inmate

From:
Insane since: Jun 2003

posted posted 05-31-2009 00:03

sorry thanks i realized that i dont need the var when i am using public, protected, and private access modifiers. thanks anyway

« BackwardsOnwards »

Show Forum Drop Down Menu