Hi there,
gush, frustrating. I am not a pro; but I know PHP well enough to understand how it works. And a simple conversion from string to integer via (int)$value or intval($value) should be straightforward . But it's not working in my case.
I have a string:
which holds some information I extract via preg_match.
The resulting variable $r[0] is "99". I have an
which used to work. But I don't know for what reason, that doesn't do it anymore.
I tried all combinations of (int) and intval()
, but in vain. It treats my variable afterwards as 0.
What is wrong here?!
Thanks for any hints!
gush, frustrating. I am not a pro; but I know PHP well enough to understand how it works. And a simple conversion from string to integer via (int)$value or intval($value) should be straightforward . But it's not working in my case.
I have a string:
Code:
% population: 99%
The resulting variable $r[0] is "99". I have an
Code:
if (($r[0] >= 75))
I tried all combinations of (int) and intval()
Code:
$t = (int)$r[0]; $t = intval($r[0];
What is wrong here?!
Thanks for any hints!
Comment