Click here to Skip to main content
15,889,281 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I am very new to PHP. I have a problem.

Inside a class I want to create an object of the other class that I just wrote:
class PHPCrawlerUtils {
 $myInstance =& new phpcrawler();
........

but it gives me an error "syntax error,unfinished class declaration"

Could you please tell me what should I do?
Posted
Updated 23-Jun-10 8:30am
v2

1 solution

try $myInstance=new phpcrawler(); instead of $myInstance=& new phpcrawler();
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900