Jump to content
Larry Ullman's Book Forums
Sign in to follow this  

Wrapping $_Post Variables In Curly Braces

Recommended Posts

In Chapter 11 in the sending email script called email.php, the $_POST['name'] and $_POST['comments'] in the $body variable are wrapped in curly braces. Why are there curly braces around them. 

See the code below.

	if (!empty($_POST['name']) && !empty($_POST['email']) && !empty($_POST['comments'])){
		$body = "Name: {$_POST['name']}\n\nComments: {$_POST['comments']}";
		$body = wordwrap($body, 70);

Share this post

Link to post
Share on other sites

Join the conversation

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

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

Sign in to follow this  

  • Create New...