Re: tie string value together

From: Date: Mon, 15 Jan 2001 06:53:20 +0000
Subject: Re: tie string value together
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-34575@lists.php.net to get a copy of this message
Hello Jacky, (Jl == "Jacky@lilst") jacky@activelifestyle.com writes: Jl> This may sound too easy to ask but I want ot make sure if I'm Jl> correct. I have a form with date, month and year select fields in Jl> it. When I submit, i want to tie those three fields value together Jl> and insert into a field in table which has date data type. Is it Jl> correct to tie those three value like below? Jl> $Birthdate = $year&$month&&day; Not quite; you want the concatenation operator: $Birthdate = $year . $month . $day; /* assuming &&day was a typo */ This will also work: $Birthdate = "$year$month$day"; And so will this: $Birthdate = "${year}${month}${day}"; Jl> And I will insert value in $Birthdate into table. Jl> cheers Jl> Jack -Brian

« previous php.general (#34575) next »