Hello guys today i will tell you through this tutorial how you can find small number from any array through php program. How to Find the Smallest Number in an Array in PHP, Find the smallest elements in an array using PHP, How to find minimum value of an array With PHP <?php$numbers = array(2,17,40,22,5,6,14,7,19,54);$length […]
See MoreCategory: php program
How Can I Send Email Using mail() Function in PHP?
PHP provides you with built in mail () function to send emails. The general syntax of this function is given below. Keywords :- Send Email Using Mail() Function by PHP, How to Send Email with Mail() Function Using PHP PHP Mail Function Syntax mail(to,subject,message,headers,parameters); In PHP, 4 parameters are passed inside the mail () function […]
See MoreWrite a PHP Program to Print Table of a Number.
Print Table of a Number Using PHP Program, How to Display Table Number in PHP, PHP Program Print Table Number Exapmle :- Print Table of 2. <?php define(‘a’, 2); for($n=1; $n<=10; $n++) { echo $n*a; echo ‘<br>’; } ?> Exapmle :- Print Table of 3. <?php define(‘a’, 3); for($n=1; $n<=10; $n++) { echo $n*a; echo […]
See MoreWrite a PHP Program to Print Sum of Digits.
Sum of Digit Numbers Using PHP Program, How to Sum of Digit by PHP, Print Sum of Digits Number in PHP Program <?php $num = 20202021; $sum=0; $rem=0; for ($i =0; $i<=strlen($num);$i++) { $rem=$num%10; $sum = $sum + $rem; $num=$num/10; } echo “Sum of digits 20202021 is $sum”; ?>
See MoreFind Whether a Number is Armstrong Number or Not in PHP With Form
PHP Armstrong Number Program,How do I Find My Armstrong Number Using PHP, Check if a number is armstrong number or not Using PHP, Armstrong Number program in PHP with form If user here takes value 153 (3 digits), then the number of digits is the number of their th power increases. 13 + 53 + […]
See MoreWrite a program to find whether a number is Armstrong or not in PHP with Form
PHP Armstrong Number Program,Check if a number is armstrong number Using PHP, Armstrong number Program in PHP, PHP Script to find Armstrong number or not, Write a PHP program to check if a number is an Armstrong number or not, Armstrong Number program in PHP with form armstrong-or-not-in-php-with-form.php <!DOCTYPE html> <html> <head> <title>Write a program […]
See MoreWrite a program to print Reverse of any number
<?php if(isset($_POST[‘reverse’])) { $rev=0; $num=$_POST[‘rev’]; while($num>=1) { $re=$num%10; $rev=$rev*10+$re; $num=$num/10; } } ?> <html> <head> <title>Reverse</title> </head> <body> <table> <form method=”post”> <tr><td>Number</td><td><input type=”text” name=”rev”></td></tr> <tr><td>Reverse is:</td><td><input type=”text” value=”<?php if(isset($_POST[‘reverse’])){echo $rev;} ?>” name=”rev1″></td></tr> <tr><td> </td><td><input type=”Submit” value=”Reverse” name=”reverse”></td></tr> </form> </table> </body> </html>
See MoreHow to Create a program to print Factorial of any number?
<?php $factorial_number = 5; $fact = 1; for($f=1;$k<=$factorial_number ;++$f) { $fact = $fact*$f; } echo “Factorial of $factorial_number is “.$fact; ?>
See More