Thank you for taking time to read my question. I'm trying to filter out non-numeric values from a variable in php. This is what I've tried:
$output="76gg7hg67ku6";
preg_replace('/\d/', $output, $level)
echo $level;
Preg replace should set $level to 767676, but when I echo level it has nothing in it. Your help is greatly appreciated.

$level = preg_replace('/[^\d]/', '', $output);maybe?