How to check a number is divisible by any number in php

QuestionsHow to check a number is divisible by any number in php
Web Developer asked 3 years ago

Hello,
I want to know the method to check whether any number is completely divisible by any other number or not in php.

Like i want to check whether 90 is completely divisible by 10 or not.

1 Answers
John P answered 3 years ago

You can check this using below code in php

if($90 % 10 == 0)
{
return TRUE;
}
else
{
return FALSE;
}

You can check same putting any digit in the field.
Hope this will help.