str_to_num question
hello. i have this code
PHP Code:
The problem is that i think i can t use str_to_num like that (i mean to use it for a number like 05 or 07). some ideas ? |
Re: str_to_num question
%i is the same as %01, printing a one digit integer: 5
%02i will print a too digit integer: 05 %03i will print a three digit integer: 005 and so on... PHP Code:
|
Re: str_to_num question
in that case, what is better to use ?
if i use %i for number 35 will print just 3 or 5 ? |
Re: str_to_num question
strbeak or parse will resolve your problem.
you need to elimitate the ":" from the string. Also replace get_time with time(h,m,s). And after this use str_to_num. If you dont want, compare the strings, it's more easyer, but more 'hardcoded'. |
Re: str_to_num question
If your time will always be in ##:##:## format eg. 05:14:07, you can do
PHP Code:
|
Re: str_to_num question
Quote:
|
All times are GMT -4. The time now is 16:03. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.