Firstly, you mean to test the length of the password, not whether the password is less than 6.
As for checking if there is a digit character, you can use preg_match() with the \d (decimal digit) character type.
if (strlen($_POST['password']) >= 6 && preg_match('/\d/', $_POST['password'])) {
// password is acceptable
}
It is also possible to write your own digit checking function using [man]ctype_digit/man, but regex may be easier here.