Re: how to convert array into integer

From: Date: Mon, 15 Mar 2004 06:58:18 +0000
Subject: Re: how to convert array into integer
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-180380@lists.php.net to get a copy of this message
Hi Kenneth, You can implode an array first, and convert it to integer, see below. $number = (int) implode('', $yourarray); Good Luck, Firman ----- Original Message ----- From: "Kenneth" <kenneth_dotcom@hotmail.com> To: <php-general@lists.php.net> Sent: Sunday, March 14, 2004 12:48 PM Subject: [PHP] how to convert array into integer > To all, > I have an Array ( [0] => 2 [1] => . [2] => 2 [3] => 0 [4] => 8 ) > but i want to convert it into integer 2.208 in order to use it to plot > graph....how can i convert it? > thx, > Kenneth > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#180380) next »