1) You most likely have magic_quotes_gpc set to on. Either set it to off or stripslashes() the input.
2) No, it won't print. Think of a heredoc as a quotes string without the quotes. You can, however, do something like:
$variable = <<< WHATEVER
whatever
text
goes
here
WHATEVER;
$variable.= executesomephp();
$variable = <<< WHATEVER
whatever
other
text
goes
here
WHATEVER;

Steven Kallstrom wrote:

Dear List,

This is a simple problem, but I can't really find a good
solution. and I have a general question also.

1) I have a webform that is save to a variable $html using
heredoc.

$html = <<< WEBFORM
.
<input name="company" type="text" value="$company">
.

the problem is that when you enter an apostrophe, and then repost the
page with the stored values, the apostrophe appears escaped in the edit
form.
how can I solve this?

2) is it possible to put additional ('nested') php inside a
heredoc, or will that text simply print out?

Thank you,

Steven Kallstrom


--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to