Re: Strings and default values...
| From: | Leif K-Brooks | Date: | Fri, 20 Dec 2002 18:35:22 +0000 |
| Subject: | Re: Strings and default values... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-129011@lists.php.net to get a copy of this message | ||
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,-- 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.This is a simple problem, but I can't really find a goodsolution. and I have a general question also.1) I have a webform that is save to a variable $html usingheredoc. $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 aheredoc, or will that text simply print out? Thank you, Steven Kallstrom