Writing to Heredoc from Text Area Form
- From: Matt F <mf@xxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 31 May 2007 09:45:02 -0500
I can't seem to get heredoc to populate correctly with variables through
a form.
<textarea name="Template" rows="10" cols="80">Template Here</textarea>
Contents could be something like: I want to replace $myarray[0] and
another variable $myarray[1]
I call heredoc this way:
$hubarray = explode("\n", $contents);
$template = $_POST['Template'];
foreach ($hubarray as $val) {
$hostarray = explode(",", $val);
$output = <<<EOT
$template
EOT;
I'm feeding it a file that has multiple rows separated by \n as array 1
and within those rows are fields separated by "," for array 2. I'm
trying to iterate through the arrays and populate heredoc($template)
accordingly.
.
- Follow-Ups:
- Re: Writing to Heredoc from Text Area Form
- From: Schraalhans Keukenmeester
- Re: Writing to Heredoc from Text Area Form
- Prev by Date: Re: How to know user is using Yahoo Beta or Yahoo original
- Next by Date: Debugging PHP in OS X
- Previous by thread: login script with two levels of access
- Next by thread: Re: Writing to Heredoc from Text Area Form
- Index(es):
Relevant Pages
|