check if divisible by 4 php code example Example: php if divisible by 30 if ($variable % 30 == 0) { echo 'This number is divisible by 30.'; };