A PHP 'Parse error' signifies that the syntax of the PHP script is somehow incorrect. Generally, this is due to simply overlooking an element of syntax: a missing semicolon, bracket, brace or quote.

learn more… | top users | synonyms

-3
votes
3answers
26 views

Parse error: syntax error, unexpected $end on wp get_footer [closed]

I started building a template and... <?php get_header(); ?> <div id="box-posts"> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> ...
0
votes
1answer
45 views

Binary Beast API runs on local XAMPP, Parse errors on inmotionhosting.com

This is probably a beginners problem I will later feel dumb for not figuring out, but here goes: I have been learning about the Binary Beast API and how to use it on a game fan site I volunteered on. ...
-1
votes
2answers
75 views

Parse error: syntax error, unexpected T_STRING, expecting '(' in [closed]

I've been trying to do a ranking system for a friend. Everything's ready, but an error gets in the way. The error: Parse error: syntax error, unexpected T_STRING, expecting '(' in ...
0
votes
5answers
40 views

Getting parse error while placing the string in the query [closed]

Here is my php code.Browser is generating a warning when i am trying to execute the code. <?php include("config.inc.php"); $link = mysql_connect('localhost', 'root', '') or die('Could not ...
0
votes
0answers
75 views

Parse error Inserting into arrays using PHP with Postgres [closed]

I'm running into a parse error using PHP (5.3) to input data into an array data type in PostgreSQL (9.1.5). The example below is nearly identical to the example posted on postgres.org regarding ...
0
votes
1answer
36 views

Parse error: syntax error, unexpected 'image' (T_STRING) in eval line

I`m trying to create a page that read the metadata of an image and allow user to edit it and save it to the same image. After searching the internet I have found exiftool as the solution but I can ...
0
votes
3answers
55 views

whats wrong in my code its giving parse error [closed]

This code is giving parse error Parse error: syntax error, unexpected T_STRING at line $gender=$user['gender']; .....whats wrong in this code...need help.....thanks <?php require_once ...
2
votes
5answers
161 views

Make PHP database class generic by Generating dynamic variables [closed]

Please look at the code, the array contains the table field names of the table class User { public $db_fields = array('id', 'username', 'password', 'first_name', 'last_name'); public $id; ...
-1
votes
8answers
187 views

OOP PHP unexpected T_VARIABLE [closed]

I am trying out OOP PHP and I seem to have run into a bit of a problem. class Connection { public $con = false; public $dbSelected = false; public $activeConnection = null; ...
-1
votes
2answers
1k views

why am I getting an “unexpected t_public” error? [closed]

public function getUserRoles() { public $query = "SELECT * FROM user_roles WHERE userID = ".floatval($this->userID)."ORDER BY addDate ASC"; if ($query_run = mysql_query($query)) { ...
0
votes
5answers
254 views

php static variable throwing syntax error [closed]

I am testing a small piece of code in php as below and it is throwing syntax error as "PHP Parse error: syntax error, unexpected '(', expecting ',' or ';' in testclass.php on line 4" <?php class ...
0
votes
4answers
167 views

Calling PHP built-in function from within a class [closed]

Please, what is wrong with the following code? And what is the correct way to do it? class SomeClass { var $someVar = trim('some value'); } The error I get: PHP Parse error: syntax error, ...
-1
votes
3answers
332 views

Can't declare even the most simple class in PHP - Am I going insane? [closed]

I'm getting this error whenever I attempt to declare a class: Parse error: syntax error, unexpected T_VARIABLE, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in ...
3
votes
3answers
2k views

Error code while trying to use private variables in a function [closed]

I get an error that says Parse error: syntax error, unexpected T_PRIVATE in E:\PortableApps\xampp\htdocs\SN\AC\ACclass.php on line 6 while trying to run my script. I'm new to classes in ...
0
votes
1answer
46 views

Syntax error when in a class but not out in the open? [closed]

When I do: class MyClass { public $copy = file_get_contents('somefile.mdown'); } I get: PHP Parse error: syntax error, unexpected '(', expecting ',' or ';' \ in /file.php on line 25 I'm new ...

1 2
15 30 50 per page