By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,776 Members | 1,233 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,776 IT Pros & Developers. It's quick & easy.

is "EOFORMPAGE" simply not used?

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.