RE: [PHP] tie string value together

From: Date: Mon, 15 Jan 2001 05:02:31 +0000
Subject: RE: [PHP] tie string value together
Groups: php.general 
Request: Send a blank email to php-general+get-34559@lists.php.net to get a copy of this message
> This may sound too easy to ask but I want ot make sure if I'm correct. I > have a form with date, month and year select fields in it. When I submit, i > want to tie those three fields value together and insert into a field in > table which has date data type. Is it correct to tie those three value like > below? > > $Birthdate = $year&$month&&day; > > And I will insert value in $Birthdate into table. Not quite. right idea, wrong syntax. You're just doing a simple string concatenation, so what you actually want is this: $Birthdate = $year . $month . $day; Jason -- Jason Murray jasonm@melbourneit.com.au Web Design Team, Melbourne IT Fetch the comfy chair!

« previous php.general (#34559) next »