Re: String 2 Number

From: Date: Wed, 10 Oct 2001 11:49:59 +0000
Subject: Re: String 2 Number
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-70628@lists.php.net to get a copy of this message
> $a="1234"; //string > $a+=0; // int > I believe this will work as well: $string = (int) "1234"; To turn it back to a string use $string = (string) "1234"; Other options : (bool), (float) -- Stig-Ørjan Smelror Systemutvikler Linux Communications AS Sandakerveien 48b Box 1801 - Vika N-0123 Oslo, Norway tel. +47 22 09 28 80 fax. +47 22 09 28 81 http://www.lincom.no/

« previous php.general (#70628) next »