HTML as array elements
| From: | Jason Bryner | Date: | Mon, 07 Aug 2000 23:24:07 +0000 |
| Subject: | HTML as array elements | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-10552@lists.php.net to get a copy of this message | ||
I'm trying to put HTML/PHP into an array element using the following code
below. So that I can echo the $db_field_list[0]["snippet"] and it will
output the code. But it is not working. It doesn't output anything. What
is the problem?
$db_field_list = array(
"0" => array(
"Prize" => "textbox",
"Question" => "textbox",
"snippet" => addslashes(
'echo "<p><span class="mpstext"><b>This
month\'s prize
is:</b></span>\n";
echo "<table width="100%" border="0"
cellspacing="0"
cellpadding="3">\n";
echo "<tr bgcolor="EEEEEE">\n";
echo "<td class="mpstext">" . $news[$i]["Prize"] .
"</td>\n</tr>\n</table>\n";
echo "<p><span class="mpstext"><b>This month\'s
trivia question
is:</b></span>\n";
echo "<table width="100%" border="0"
cellspacing="0"
cellpadding="3">\n";
echo "<tr bgcolor="EEEEEE">\n";
echo "<td class="mpstext">" . $news[$i]["Question"]
.
"</td>\n</tr>\n</table>\n";'
)
),
"1" => array(
"Title" => "text",
"Date" => "text",
"Author" => "text",
"News" => "textbox",
"snippet" => addslashes(
'echo "<p><span class="mpstext"><b>This
month\'s prize
is:</b></span>\n";
echo "<table width="100%" border="0"
cellspacing="0"
cellpadding="3">\n";
echo "<tr bgcolor="EEEEEE">\n";
echo "<td class="mpstext">" . $news[$i]["Prize"]
.
"</td>\n</tr>\n</table>\n";
echo "<p><span class="mpstext"><b>This month\'s
trivia
question is:</b></span>\n";
echo "<table width="100%" border="0"
cellspacing="0"
cellpadding="3">\n";
echo "<tr bgcolor="EEEEEE">\n";
echo "<td class="mpstext">" .
$news[$i]["Question"] .
"</td>\n</tr>\n</table>\n";'
)
)
)
?>
Jason
--
Focus Design
423 238 3320
http://www.focusdesigngroup.com/