$a = '|234|';
想取出$a=234;
------解决方案--------------------
echo (int)str_replace('|','',$a);
------解决方案--------------------
- PHP code
$a = '|234|'; preg_match('/\d+/',$a,$match); print_r($match[0]);
$a = '|234|'; preg_match('/\d+/',$a,$match); print_r($match[0]);