Jump to content

[SOLVED] Using an array in the $body of mail()


peuge

Recommended Posts

$body =$name." ".$surname." Has made a booking. Please find the details below \n \nDate Taking:".$date_in."\nDate Returning: ".$date_out."\nNumber of bikes: ".$amnt."\n\nContact Details:\nTel: ".$tel."\nEmail: ".$email."\n\nBike Registration:\n".for ($i=0;$i<$amnt;$i++){echo $available[$i];}."\n"; 			

 

Hi there,

 

I am having problems sending the values in the $available array with mail(). When I use the above code I get a

Parse error: syntax error, unexpected T_FOR in C:\xampp\htdocs\csr\send.php on line 21

 

I am not using foreach() because I only want a certain number of the array elements to be sent.

 

Thanks in advance.

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.