How can I get 23 instead of 1 for $lastnum1?
23
1
$lastnum1
$text = "1 out of 23"; $lastnum1 = $this->getEval(eregi_replace("[^* out of]", '', $text));
you could do:
$text = "1 out of 23"; if(preg_match_all('/d+/', $text, $numbers)) $lastnum = end($numbers[0]);
1.4m articles
1.4m replys
5 comments
57.0k users