Re: Parse String to Integer?
| From: | Jason Murray | Date: | Tue, 12 Sep 2000 15:00:05 +0000 |
| Subject: | Re: Parse String to Integer? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-16364@lists.php.net to get a copy of this message | ||
Santhyago Bueno Gallao wrote:
>
> How i do to convert string to integer(number)?
>
> $first = "3";
> $sec = 2;
>
> $sum = $sec + $function($first);
>
> What is the "$function()"?
>
I guess you want to do this:
sscanf($first, "%d", $first_as_int);
$sum = $sec + $first_as_int
> Tks,
>
> Santhyago
>
Greetings,
Jason
--
Jason Murray
Developer
jWeb New Media Design
+1-636-928-3162