Code given below -
echo <<
-
<style type="text/css">
-
table, tr, td, th, tbody, TR, TD{
-
font-family: Verdana;
-
font-size: 8pt;
-
font-size: 11;
-
color: #000000;
-
border-font-size: 11;
-
color: #000000;
-
border-collapse: collapse;
-
}
-
</style>
-
<table border="l" cellpadding="l" width="98%">
-
<tr>
-
<td align="center" colspan="7" bgcolor="#999999"> $Current_Day_Name,$Current_Month_Name, $Current_Year
-
</tr>
-
<tr>
-
-
$Day_Names
-
</tr>
-
<tr>
-
$Cal_Weeks_Days
-
<tr>
-
</table>
-
HTML;
-
?> (line no 103)
7 4734
Hi bandula, check this out. - $php_data_goes_here='Some_php_out_put';
-
echo 'HTML_DATA_GOES_HERE '.$php_data_goes_here.' AND_ANOTHER_HTML';
-
echo '<br>';
-
echo "YOUR HTML DATA AND $php_data_goes_here";
Please use the code tags when posting source codes in this format.
[code=php]
your php code goes here
[/code]
Your first line should be
What's so wrong with heredoc? It has its uses. Biggest issue is modifying code later on and realizing that you're in heredoc.
Any variables within heredoc will be parsed as PHP handles double quotation marks.but when you closing it do not use any spaces or other characters on it. in other words; - <?php
-
$some_var = 'String2';
-
echo <<<EOT
-
String1 $some_var String3
-
/* because of this error comes*/EOT;
-
?>
-
Heya guys, I found something interesting with the forum text editor. I copied this to Wysiwyg editor:
<?php
$some_var = 'String2';
echo <<<EOT
String1 $some_var String3
EOT;
?>
And got this, after pressing CODE icon. See <EOT is missing - <?php
-
$some_var = 'String2';
-
echo <<
-
String1 $some_var String3
-
EOT;
-
?>
So I think on the original post also, It has happened. (that was my fault, I am the one who add the CODE tags to the source codes)
So Its better to hand code the [code] tags with out clicking the icons on the editor. :D
What's so wrong with heredoc? It has its uses. Biggest issue is modifying code later on and realizing that you're in heredoc.
Output control is key if your using headers or sessions. If you use a heredoc you have to generate all that stuff at the end and probably not in the most efficient manor.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Wescotte |
last post by:
The error message Parse error: syntax error, unexpected $end in FILE on
line X is one I run into frequently and I know the cause is I missed an
ending quote.
Is there an easy way to determine...
|
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: praclarush |
last post by:
I've just started php, and this is a class assignment, but my question is I’m getting this error PHP Parse error: syntax error, unexpected T_IF, expecting T_VARIABLE or '$' in...
|
by: ajd335 |
last post by:
Hi all...
I am getting an error Parse error: syntax error, unexpected $end in http:/..... on line 117...(117 is the EOF)..
can you plz help me out..I have checked out for the < , > ,{ ,} etc.......
|
by: akohistani |
last post by:
I am having Parse error problem with my newly purchased Php upload script I have uploaded the script and I get the error below
Parse error: syntax error, unexpected $end in URL/functions.php on...
|
by: benicio |
last post by:
Parse error: syntax error, unexpected T_STRING, expecting '(' in C:\wamp\www\study_group\includes\functions.php on line 19
I got this error and this syntax is from 8 to 19th line.
<?php
...
|
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: CYNTHIA CUTRER |
last post by:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
...
|
by: vultren |
last post by:
Parse error: syntax error, unexpected $end in
I keep getting that, I have no clue where to fix it. Any help would be VERY APPRECIATED!
<?php
if(isset($_POST)) {
// EDIT THE 2 LINES...
|
by: Ann Madden |
last post by:
Hello - I am super green to php and mysql. I have received the following error: Parse error: syntax error, unexpected $end in C:\website\chart.php on line 84... I have been through the code matching...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
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: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| | |