Home > Syntax Error > Syntax Error Unexpected '$this' (t_variable) Expecting Function (t_function)

Syntax Error Unexpected '$this' (t_variable) Expecting Function (t_function)


I can do what i need to do with arrays and globals, but thought this would be a good time to start learning some oop stuff...ack... –Phil Apr 13 '10 at I've been all over the forums here and else where and while it appears to be a simple formatting error I can't for the life of me find the thing.The full asked 4 years ago viewed 28002 times active 4 years ago Get the weekly newsletter! Is it appropriate to tell my coworker my mom passed away? http://smartphpstatistics.com/syntax-error/syntax-error-unexpected-t-string-expecting-function-t-function.html

Visibility keywords such as public/private are another PHP 5 invention. I feel like this is one of those 'did you check if the TV is plugged in' type of issues.... however in copy/pasting fireeyedboy's example below, i have replaced it with lowercase 'c'. Direct var assignments must be simple constants.

Error Unexpected T_variable Expecting T_old_function Or

Log in or register to post comments Add child issue, clone issue News itemsDrupal news Planet Drupal Association news Social media directory Security announcements Jobs Our communityCommunity Getting involved Services, Training Using Java's Stream.reduce() to calculate sum of powers gives unexpected result Developing web applications for long lifespan (20+ years) Can an ATCo refuse to give service to an aircraft based on Is there a role with more responsibility?

more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed Thanx a million, Merlin Brad Bonkoski schrieb: Merlin at Apr 11, 2006 at 8:14 am ⇧ Hi there,no much simpler. php php-parse-error share|improve this question edited Apr 11 '13 at 22:15 tereško 42.6k1567124 asked Apr 13 '10 at 21:12 Phil 10610 closed as too localized by tereško, Lusitanian, DaveRandom, Ocramius, cryptic Syntax Error, Unexpected '->' (t_object_operator) But why not rewrite your WhosOnline method like this: public function DisplayUsers(){ $get_current_status = mysql_query( "SELECT * FROM `online_users` WHERE `room` = '" .

Ever. –Ignacio Vazquez-Abrams May 1 '12 at 17:38 Should have been typo. Expecting Function (t_function) Php Forgot your username? Are "ŝati" and "plaĉi al" interchangeable? http://stackoverflow.com/questions/10401722/parse-error-syntax-error-unexpected-t-variable-expecting-t-function that was introduced in PHP 5.

Not sure why the version in cpanel differs from phpinfo() though. Parse Error: Syntax Error, Unexpected T_variable In Php Constructors in 4 are functions with the same name as the class. Thisis just inside the class. Looks like you are using PHP < 5. –Felix Kling Apr 13 '10 at 21:23 supposedly 5.2.11.

Expecting Function (t_function) Php

Basically if you want to use classes you have to play by the rules Brad Bonkoski at Apr 11, 2006 at 11:57 am ⇧ Merlin wrote:chris smith schrieb:On 4/11/06, Merlin wrote:chris http://board.phpbuilder.com/showthread.php?10331077-Parse-error-syntax-error-unexpected-T_VARIABLE-expecting-T_OLD_FUNCTION Search - Debugging 101 - Collected Solutions - General Guidelines - Getting help at all Reply With Quote Quick Navigation General Help Top Site Areas Settings Private Messages Subscriptions Who's Online Error Unexpected T_variable Expecting T_old_function Or In a PHP script, I keep getting the following error. Syntax Error, Unexpected '$data' (t_variable), Expecting Function (t_function) I'm really stuck!

laurapakora 1 0 Thu Sep 9, 2010, 1:57 pm PM Re: Parse error: syntax error, unexpected '$', expecting T_VARIA Fri Sep 10, 2010, 8:16 am Hi laurapakora,I suspect

function SetDBUsername($db_username) { $this->db_username = $db_username; } If you want to set a default: var $db_username = 'xxxxxxxx'; -- Postgresql & php tutorials http://www.designmagick.com/ Chris smith at Apr 11, 2006 at http://smartphpstatistics.com/syntax-error/parse-error-syntax-error-unexpected-t-string-expecting-t-variable-or-39-39.html How do i mail a value from a mysql databse? Comments Comment #1 silurius CreditAttribution: silurius commented February 14, 2007 at 6:35pm I note that the readme mentioned no MySQL 4+ support, but I thought I had read elsewhere that this This can be tedious as it does add a little more codebut will save you in the long run when incase some developer decides to justover write one of your variables Expecting T_function

Or you can set class members based on CONSTANTS (as you were doing with the query string). Truth in numbers more hot questions question feed default about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Technology Life / Arts For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question. http://smartphpstatistics.com/syntax-error/unexpected-t-variable-expecting-function-t-function.html Was This Post Helpful? 0 Back to top MultiQuote Quote + Reply #11 creativecoding Hash != Encryption Reputation: 928 Posts: 3,214 Joined: 19-January 10 Re: Parse error: syntax error, unexpected

question, let alone a ChronoForms one???Bob

ChronoForms technical supportIf you'd like to buy me a coffee or two, thank you very much

GreyHead Moderator 45243 56323 Tue May 29, 2007, 6:15 Class Constructor Php Thisis just inside the class. Is there some sort of option that allows you to turn classes off in php.ini? –Phil Apr 13 '10 at 21:40 add a comment| 3 Answers 3 active oldest votes up

As they say above, that's for the reader to implement ;-) Rather use mysql_safe_string(..).

For example $var1 = $var2;Merlin reply | permalink Brad Bonkoski You're right... Top All times are GMT -4. What are "desires of the flesh"? Php Class Example Plot output of FourierTransform in mathematica How to clean Car's HVAC and AC system With the passing of Thai King Bhumibol, are there any customs/etiquette as a traveler I should be

This is also very nifty. Digital Diversity How do computers remember where they store things? whats going on here? –Phil Apr 13 '10 at 21:21 1 @Phil: Which PHP version are you using? http://smartphpstatistics.com/syntax-error/parse-error-syntax-error-unexpected-39-39-expecting-function-t-function-in.html I just copied the exact same code, and it worked fine.

Asetter function enforces encapsulation.On 10/04/06, Merlin wrote:Hi there,I would like to assign a value inside a class like this:var $db_username = $old_name;Unfortunatelly this does not work and I do get following Thisis just inside the class. Join them; it only takes a minute: Sign up Parse error: syntax error, unexpected T_VARIABLE, expecting T_FUNCTION up vote 2 down vote favorite Could someone tell me what I'm doing wrong? How to deal with players rejecting the question premise What are Imperial officers wearing here?

more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed Note: many of the ideas can be used in ChronoForms v4 but the admin interface is very different and code examples may need to be modified. How do I help minimize interruptions during group meetings as a student? How do you say "root beer"?

Is it "eĉ ne" or "ne eĉ"? more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed