Hi,
Kindly sort me out on this nagging issue, Unexpecting T_ENCAPSED_AND_WHITESPACE, expecting T_string or T_variable or T_NUM_STRING.
HERE IS THE CODE: 1 3669 Atli 5,058
Expert 4TB
Hey.
The problem is that you are using the heredoc syntax incorrectly. Check out the Heredoc syntax part in the manual.
Basically, the end delimiter must be the first thing in the line. If there is so much as a white-space before it, you will get a syntax error. -
<?php
-
// Will NOT work
-
$var = <<<HEREDOC
-
-
HEREDOC;
-
-
// Will work
-
$var = <<<HEREDOC
-
-
HEREDOC;
-
?>
-
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Anna MZ |
last post by:
I am new to php and have written the following mysql code to enter the details of a new user in the admin subdomain of my website:
$sql = "INSERT INTO 'users' ('userid', 'username', 'upassword')...
|
by: epots9 |
last post by:
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /var/www/html/xxx.php on line xxx
I get that message when i try to run my...
|
by: Phaelle |
last post by:
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING'
What does that error mean? I canīt find the mistake!!
In another script, I have got another kind of mistake : parse...
|
by: basswhizz |
last post by:
Hi everyone im a high school student and I'm having trouble with one of my projects could you please help!!
I'm getting this error message.
Parse error: syntax error, unexpected...
|
by: rhys |
last post by:
My Gurus and Angels --
Please pardon this old-school programmer, only recently enlightened to open-source, having been trapped in the convenience of proprietary lingos for way too long. My...
|
by: crystal2005 |
last post by:
I found such eror message when i tried to test sending email.
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in...
|
by: fburn |
last post by:
I need some help with an error I'm getting using php 5.2.5 running on linux.
I receive an error:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or...
|
by: mideastgirl |
last post by:
I keep getting this error and I cannot figure it out. My curly brackets are closed, and I am using the correct tags for <?php to open and ?> to close my code. Can someone please help me!
Here is...
|
by: TanjaPetro |
last post by:
Hello to everyone.
I changed a few files on my site and when I tried to log into the admin area I got this message:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting...
|
by: karine |
last post by:
Hi, I keep getting this error message "Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ']' in /home/env49986/public_html/welcome.php on line 16"
below is the code
...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| | |