Re: returning the integers
| From: | Richard Lynch | Date: | Wed, 06 Dec 2000 02:07:35 +0000 |
| Subject: | Re: returning the integers | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-28818@lists.php.net to get a copy of this message | ||
$int = (int) "-34&other crap here";
echo $ind, "<BR>\n";
You could even use:
$str = "-34& whatever";
$foo[(int)$str] = "some value here";
----- Original Message -----
From: "Gokcen Ogutcu" <gokceno@turk.net>
Newsgroups: php.general
Sent: Monday, December 04, 2000 10:53 AM
Subject: [PHP] returning the integers
hi,
i need to return integers, starting from the first integer, from a string. i
mean -34& should return as -34 , the strings length is always 3 chars.
by the way, i'll use this in an associative array.
any input is welcome.
thanks in advance,
gokcen