RE: [PHP] tie string value together

From: Date: Mon, 15 Jan 2001 05:21:03 +0000
Subject: RE: [PHP] tie string value together
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-34563@lists.php.net to get a copy of this message
Also, a great tutorial on strings is (print this out) : Using Strings : ------------------------------------------------------ http://www.zend.com/zend/tut/using-strings.php by Nathan Wallace As well as the manual entry : PHP Manual -> Strings : ------------------------------------------------------ http://www.php.net/manual/en/language.types.string.php by An unknown friend The above information will prove helpful. Keyword here is, as mentioned and demonstrated by Jason, Concatenation. Regards, Philip Olson http://www.cornado.com/ be outside the box. On Mon, 15 Jan 2001, Jason Murray wrote: > > 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! > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#34563) next »