Re: combining text with $_POST

From: Date: Sun, 06 Apr 2003 01:36:17 +0000
Subject: Re: combining text with $_POST
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-142560@lists.php.net to get a copy of this message
On Saturday 05 April 2003 08:00 pm, John W. Holmes wrote: > > Hi all, how can I combine this line to use just 1 echo statement? > > > > echo "Name: "; echo $_POST['name'] > > The period is used for string concatenation: > > echo "Name: " . $_POST['name']; > > Many ways you can do it: > > echo "Name: {$_POST['name']}"; > echo 'Name: ' . $_POST['name']; > echo "Name: $_POST[name]"; > echo 'Name: ' . $_POST["name"]; > etc... Thank you all for the quick response. I was using this method and now I finally see my error which was I forgot to put the " . " before " $_POST" As you all can see, im relativly new to PHP and I think I'll thank you all for putting up with me now instead of later.. : - ) -- David M. Edification Web Solutions http://www.edificationweb.com

« previous php.general (#142560) next »