从数组中提取的PHP电子邮件表单

I created an email form using php and want to have it sent to my e-mail. however all the values for the message are in an array. I used the extract function, but it is coming back null this is the code for the e-mail portion of it.

foreach($good_data as $field => $value)
        {
            $good_data[$field] = mysqli_real_escape_string($cxn,$value);
        }
    $to =  "***********";
    $sub = "Cameron Web Design";
    $mess = extract($good_data[$value]);
    mail($to,$sub,$mess);

    include('success.html');    

It will send the fields, but not what was put into them.

You are using extract() the wrong way, extract() actually creates 1 variable for each element in the array named as the element key name and has the same value of that element, and the function it self returns the number of values imported into a variables.

Maybe what you are looking for is implode()

Ref: PHP: extract()