Php Preg_replace Whitespace

$id = "aa aa";
echo $id;
preg_replace('/\s+/', '_', $id);
echo $id;
Agreeable Addax