Read minus and zero number
How to read a minus, zero number from string?
is_str_num return false if string have a minus/zero number |
Re: Read minus and zero number
Show your code
|
Re: Read minus and zero number
PHP Code:
|
Re: Read minus and zero number
What string is in szSaid when it's not working?
|
Re: Read minus and zero number
eg. -1, -2, -545335 or 0
|
Re: Read minus and zero number
Use charsmax() instead of hardcoding your arrays
FYI: this won't fix your issue though lol |
Re: Read minus and zero number
Maybe a solution:
- check if [0] character is '-' - if so, replace '-' with '' (to be EOS or just a emtpy space?) - then use is_str_num ? |
Re: Read minus and zero number
If you want to compare number, try read_argv_int native.
I guess that will solve the problem. |
Re: Read minus and zero number
Hope this helps you.
PHP Code:
|
Re: Read minus and zero number
why does everyone still hardcore their arrays when charsmax' there to make it easy for you?
|
| All times are GMT -4. The time now is 02:40. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.