peuge Posted August 25, 2008 Share Posted August 25, 2008 $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. Quote Link to comment Share on other sites More sharing options...
Drezard Posted August 25, 2008 Share Posted August 25, 2008 its saying you cant use a for statement in the variable declaration. I would say its cause your declaration is too long and doesn't contain enough ()()()'s. (I think). so maybe set something like $for = .... $body = .... $for .... Daniel Quote Link to comment Share on other sites More sharing options...
peuge Posted August 25, 2008 Author Share Posted August 25, 2008 Works! Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.