Jump to content

[SOLVED] Assign Array values to a variable


hsaenz12

Recommended Posts

I have this

 

$p_number = $_POST['Req_number'];

//which is an array of values from a form

 

I need something like this

$body = $prefix."\n".$name.' <'.$email.'>'."\r\n\r\n".stripslashes($body)."\r\n\r\n".stripslashes($p_number);

$mail->setBody ( $body );

 

but $p_number returns "array" in the email body.

How can I print the values of the array in the $body variable????

Thank you Lemmin.

 

What if i have this

 

$p_number = $_POST['Req_number'];

$p_value = $_POST['Req_value'];

 

and want something like this

 

foreach ($p_value as $v)

foreach ($p_number as $n)

$body .= stripslashes($n) .stripslashes($v) . ",";

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.