473,395 Members | 1,872 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

is "EOFORMPAGE" simply not used?

Hi,

I'm developing a website in PHP - it's my first one... :-)
Somewhere (I'm not sure where) I've come up with the function:
"EOFORMPAGE". I use it like this:

$content = <<< EOFORMPAGE
<table border=1>
<tr>
<td><b>test</b></td><td>$test</td>
</tr>
</table>
EOFORMPAGE;

This enables me to use straigt HTML, put in in a variable ($content in
this case), and add the content of the variable $test in this case as
well. This works very good. It is especcially usefull when working
with JS, as I'm not limited by problems with quotes.

My concern: I cannot find another example of this function
"EOFORMPAGE" /at all/. Is it not used? Frowned upon? Depricated? Can
someone help me out on this one, as I would not like to write code
that is considered 'bad'.

thanks,

Paul
Jul 17 '05 #1
2 1523
pw******@gmail.com (pw******@wms.to) wrote in
news:7a*************************@posting.google.co m:
Hi,

I'm developing a website in PHP - it's my first one... :-)
Somewhere (I'm not sure where) I've come up with the function:
"EOFORMPAGE". I use it like this:

$content = <<< EOFORMPAGE
<table border=1>
<tr>
<td><b>test</b></td><td>$test</td>
</tr>
</table>
EOFORMPAGE;

This enables me to use straigt HTML, put in in a variable ($content in
this case), and add the content of the variable $test in this case as
well. This works very good. It is especcially usefull when working
with JS, as I'm not limited by problems with quotes.

My concern: I cannot find another example of this function
"EOFORMPAGE" /at all/. Is it not used? Frowned upon? Depricated? Can
someone help me out on this one, as I would not like to write code
that is considered 'bad'.

thanks,

Paul


it's not a function, but a differnet syntax to write down strings.

it's called heredoc syntax, valid from php4 onwards, details in the
manual.

micha

--
Jul 17 '05 #2
Micha
it's not a function, but a differnet syntax to write down strings.

it's called heredoc syntax, valid from php4 onwards, details in the
manual.


Micha,

thanx a million! This is de information I was searching for. If you
don't know how something is called, it can get hard to find something.
:-)

Paul

Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: William Payne | last post by:
Hello, when compiling my program I get a warning in one of my header files (globals.h) each time a source file includes it. The warning reads: globals.h:28: warning: `const...
6
by: Andreas Schmitt | last post by:
Hi, with myTeam being a vector of pointers to a class 'Team' std::vector<Team*> myTeam; I tried to use these two methods in the class 'League'
4
by: Jason | last post by:
Hi, I have this old class that was used for logging error messages and I thought it would be a good exercise (for me) to convert it to .Net specifically c#. This class uses two typed pointer...
17
by: Barret Bonden | last post by:
As an old programmer just now looking at VB.net I have a question: How does one simply open one form from another ? I don't mean how does one create a new instance of that form , but rather how...
30
by: Pep | last post by:
Is it best to include the code "using namespace std;" in the source or should each keyword in the std namespace be qualified by the namespace tag, such as std::cout << "using std namespace" <<...
3
by: Jake Barnes | last post by:
On this page I'm given the impression that stopPropagation is a lot like returning false: http://www.brainjar.com/dhtml/events/default3.asp "preventDefault() Can be used to cancel the...
8
by: Matthew Wells | last post by:
Hello, How do I tell if a variable dim'd as an Access.Application has something in it. dim mApp as Access.Application set mApp = new Access.Application mApp.OpenCurrentDatabase mydb.mdb
7
by: intrader | last post by:
I have the following small classes: //----------------code--------------- using System; using System.Collections.Generic; using System.Text; namespace ValidatorsLibrary { public class...
0
by: Xah Lee | last post by:
In this article, i explain how the use of bit masks is a hack in many imperative languages. Often, a function will need to take many True/False parameters. For example, suppose i have a function...
11
by: James R. Davis | last post by:
Yes, a newbie here. Though I am making progress, slowly, I am also getting more and more confused. With ASP, when I wanted to do something as trivial as updating a visitor counter, I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
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
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
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,...
0
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...
0
Oralloy
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,...
0
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 using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.