Linked Questions

24 votes
4 answers
154k views

syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING [duplicate]

I have been staring at this code for hours now and I cannot figure out where my mistake is. I know this syntax error usually comes up because of some missing or out of place curly brace or some issue ...
user1083482's user avatar
8 votes
3 answers
37k views

Parse error: syntax error, unexpected '[' How to fix this one? [duplicate]

I'm trying to initialize a function of CI in my native code. $cipher->initialize( [ 'driver'=>'openssl', 'key' => $key ] ); I'm getting an error of ...
Ligthers's user avatar
  • 217
15 votes
2 answers
89k views

php - syntax error, unexpected T_DOUBLE_ARROW [duplicate]

how i can rid of this error?? Parse error: syntax error, unexpected T_DOUBLE_ARROW in /var/www/core/restvt.api.php on line 35 PHP Code : $datax = Array(); foreach ($inis as $key => $data) { ...
Andi Doank's user avatar
13 votes
2 answers
37k views

unexpected 'class' (T_CLASS) only on remote (not in local) [duplicate]

We are developping a CRM. In local, I have no problem, but in remote (OVH), I have this error message : Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or ...
user3553866's user avatar
1 vote
3 answers
88k views

What's wrong? PHP Parse error: syntax error, unexpected '}', expecting ',' or ';' in [duplicate]

Me and my mate we're trying to solve this for over 1.5 hours, we are still getting the same and tried almost everything we could. Could anyone help us do that? This is error what we're getting: PHP ...
aerond's user avatar
  • 85
3 votes
4 answers
73k views

Parse error: syntax error, unexpected '"', expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) [duplicate]

Parse error: syntax error, unexpected '"', expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in C:\xampp\htdocs\cc_real\3HLR14CMORCGZ0IY8AE7H4JL409RV9\insert.php on ...
Rocky's user avatar
  • 67
0 votes
1 answer
52k views

Parse error: syntax error, unexpected '$connection' (T_VARIABLE) in C:\xampp\htdocs\final\newmail.php on line 7 [duplicate]

When I run this code: <?php $reuser = $_GET['ruser']; $mail = $_GET['msg']; $sender = $_GET['senderr'] $connection = mysql_connect("localhost","root"); mysql_select_db("final"); if(!$...
zakariya's user avatar
3 votes
2 answers
12k views

PHP Parse error: syntax error, unexpected identifier "AnsiColorMode" [duplicate]

I got this error while deploying my project on AWS Elastic BeanStalk. I recently pulled my project from github, before that it deploys without issues. On tracing the error, I found that this line @php ...
BlackPearl's user avatar
  • 2,720
0 votes
4 answers
23k views

How to echo <img src with PHP variables as values of the src attribute [duplicate]

I am getting error when I try to echo image in PHP. Here is my code: $sql = "SELECT id, title, filename FROM images"; $result = $conn->query($sql); if ($result->num_rows > 0) { // output ...
Elizabeth Kof's user avatar
0 votes
2 answers
49k views

Parse error: syntax error, unexpected 'text' (T_STRING), expecting ',' or ';' [duplicate]

I am having trouble getting this to work. I have been able to call data from a dropdown menu and place it into a table and have it actively update without reloading the page. I am now trying to get ...
Leo Frost's user avatar
0 votes
1 answer
14k views

PHP error "Notice: Use of undefined constant row - assumed 'row'" MySQL [duplicate]

Error: Notice: Use of undefined constant row - assumed 'row' Relevant Code [PHP]: if ($result->num_rows > 0) { while($row = $result->fetch_assoc()) { echo ...
iceybeta's user avatar
1 vote
1 answer
38k views

PHP error Parse error: syntax error, unexpected '<' in [location]index.php on line 7 [duplicate]

i am sorta new to PHP, i mostly use HTML. I have made a PHP script. What the code should do is display a youtube video when i put the code. like this "website.com/youtube.php?v=1010111" It would ...
Mateo's user avatar
  • 69
1 vote
1 answer
13k views

Parse error: syntax error, unexpected 'use' (T_USE) in C:\wamp\www\calculater\wp-content\themes\calculater\page.php on line [duplicate]

ob_start(); require_once '\dompdf\autoload.inc.php'; use Dompdf\Dompdf; //use Dompdf\Dompdf; // instantiate and use the dompdf class $dompdf = new DOMPDF(); $html = " print_r($_POST); "; $...
Piyush Trivedi's user avatar
0 votes
3 answers
14k views

Laravel Syntax error, unexpected 'variable' (T_STRING) [duplicate]

I am trying to access a Shopping Cart view of a user, but when I click to get the Cart View it throws the below error. Error : syntax error, unexpected 'item' (T_STRING) Button: <a href="{{ ...
Iftikhar uddin's user avatar

15 30 50 per page
1
2 3 4 5
���
164