I am using this code but can't figure out what's wrong with it.
if (!empty($_POST)) {
foreach ($_POST as $key => $value) {
if (get_magic_quotes_gpc())
$value=stripslashes($value);
if ($key=='extras') {
if (is_array($_POST['extras'])) {
print "<tr><td><code>$key</code></td><td>";
foreach ($_POST['extras'] as $value) {
print "<i>$value</i><br />";
}
print "</td></tr>";
}
else {
print "<tr><td><code>$key</code></td><td><i>$value</i></td></tr>\n";
}
}
else {
print "<tr><td><code>$key</code></td><td><i>$value</i></td></tr>\n";
}
} // end foreach
}
It prints prgm 'array' in table instead of values inside array.