RE: [PHP] integer is a string ?
| From: | John Coggeshall | Date: | Mon, 24 Jul 2000 07:33:23 +0000 |
| Subject: | RE: [PHP] integer is a string ? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-7769@lists.php.net to get a copy of this message | ||
Why do you need to specifically type-cast it? PHP Is very good about taking
a String which represents an integer and converting it itself.
John
-----Original Message-----
From: Bojan Gajic [mailto:bojan@inet.co.yu]
Sent: Sunday, July 23, 2000 9:29 AM
To: dIVUS
Cc: php-general@lists.php.net
Subject: Re: [PHP] integer is a string ?
settype($ev,"integer");
dIVUS wrote:
> Hi all,
>
> When i post an integer to a PHP-script, the script seems to recognize it
as
> a string. (example below) How do i make the script recognize it as an
> integer values ???
>
> For example:
> http://www.firststep.be/scripts_jonas/inttest.php?foo=5 returns
> "string"
> The source-code of the script is just:
> <?
> $ev = gettype ($foo);
> echo $ev;
> ?>
>
> Kind regards and TNX,
> dIVUS
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
Bojan Gajic
<bojan@inet.co.yu>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net