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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.