I have a application form that accepts array of data. The data is stored efficiently on DB but when I try to put this whole data to my email address. Just the details general details like name, phone number, address are saved. multiple levels of data stored in array are not shown in email, instead they are displayed as "array".
if (isset($_POST["Submit"]))
{
$datetime = $_POST["datetime"];
$name = $_POST["name"];
$dept = $_POST["dept"];
$email = $_POST["email"];
$phone = $_POST["phone"];
$comments = $_POST["comments"];
$cnt = count($_POST['model']);
for($i=0;$i<$cnt;$i++){
$model = $_POST["model"][$i];
$tag = $_POST["tag"][$i];
$itemdesc = $_POST["itemdesc"][$i];
$Query = "INSERT INTO ssubmit (datetime, name, dept, email, phone, comments, model, outag, itemdesc) VALUES (NULL, '$name', '$dept', '$email', '$phone', '$comments', '$model', '$tag', '$itemdesc')";
$Result = mysql_query($Query, $Link) or die(mysql_error());
}
//php code to retrieve the values
foreach($_POST as $var => $value)
{
echo $var . ': <b>' . $value . "</b> \r\n";
}