Reply to Re: [PHP] checkng if string is a number

Your name:

Reply:


Posted by Max Belushkin on 11/17/05 21:47

Which version of PHP are you using? On php 4.4.0 (SuSE 10.0 default RPM, not
custom build, so perhaps I'm missing some extras you're using?) the following
script works fine:
<?php
if (10==intval("ten")) echo "boo\n"; else echo "no boo\n";
?>

I get no boo. intval doesn't convert my "ten" to a number. Moreover, the
output of the following:

<?php
echo intval("ten");
?>

produces an expected (by me) 0.

On Thursday 17 November 2005 20:37, blackwater dev wrote:
> do something else. is_int doesn't work, intval converts "ten" to a
> number so that doesn't work....
>
> Thanks!

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация