Getting number from string
Posted: Mon Apr 16, 2007 2:13 am
Code: Select all
$string = ''RD0394D";A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
$string = ''RD0394D";Code: Select all
$string = (int)"RD0394D";
// or use the function
$string = intval("RD0394D");Code: Select all
$string = ''RD0394D";
$number = preg_replace('/[^0-9]/', '', $string);