We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Fatal error: Using $this when not in object context in

rgb192
rgb192 asked
on
Medium Priority
335 Views
Last Modified: 2012-06-21
Fatal error: Using $this when not in object context in


$this->name='name';

i want to use $this
because I am copy pasting it from other code
Comment
Watch Question

Lead Developer
Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview
Top Expert 2007
Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview
Most Valuable Expert 2011
Author of the Year 2014

Commented:
You might need to copy/paste a larger section of code, perhaps including all the class definition.
Mohamed AbowardaSenior Software Engineer
CERTIFIED EXPERT
Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview

Author

Commented:
thanks
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.