Prime Number Program in PHP

PHP prime number program image

Prime Number :-  A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself. For example, 3 is a prime number because it has no positive divisors other than 1 and 3. Prime numbers are below:- 2, 3, 5, 7, 11, 13, 17, 19 …. Here I am writing the PHP program to check whether a number is Prime or not. <?php function CheckPrime($number){ for($x=2;$x<$number;$x++){ if($number%$x == 0){ return 0; } } return 1; } $a = CheckPrime(17); if ($a==0) echo ‘This is not…

Palindrome Number Program in PHP

PHP palindrome number program image

Palindrome Number :- A palindromic number or numeral palindrome is a number that remains the same when its digits are reversed. Like 53235,  Below are the example palindrome number:- 121 , 212 , 12321 , 16461 #Steps to Check a Palindrome Number :- Take a Number Now reverse its digit Now compare both the numbers if both are equals to each other then return “Number is Palindrome“. else return “Number is not Palindrome“ Here I am writing the PHP program to check whether a number is palindrome or not. Palindrome Number Program Without of Using PHP…

Fibonacci Series in PHP

PHP Fibonacci series program image

Fibonacci series means to get next term by adding its previous two numbers. For an example:- 0 1 1 2 3 5 8 13 21 Here I am writing the PHP program to print Fibonacci Series. <?php function printFabonacciSeries($number){ $a = 0; // first number of series $b = 1; // second number of series echo ‘Fabonacci Series <br/>’; echo $a.’ ‘.$b; for($i=2;$i<$number;$i++){ $c = $a + $b; //print next number of series echo ‘ ‘.$third; $a = $b; $b = $c; } } printFabonacciSeries(9); ?> Output :- 0 1 1 2 3 5 8 13 21 Alternate Way…

How to Print Hello World Program in PHP ?

Hello World PHP program image

In PHP it is very easy to print “Hello World” program. “Hello World.” is the first program from where most of the beginner developers will start to write code in any language. Here is an example of how to print “Hello World!!” in PHP. Print “Hello World” Program :- In PHP we use echo to print a string and we always write the PHP code between <?php ?>  tag. Below are the example of print simple Hello World. <?php echo “Hello World!!”; ?> Output :- Hello World!! Check video :-

PHP Introduction

PHP introduction programming image

What is PHP:- PHP stands for PHP: Hypertext Preprocessor , it is widely – used server side scripting  language designed for web devlopment. PHP also used as a general purpose programming language. It was build up by Rasmus Lerdorf in 1994 and launched in the market in 1995. PHP is the most well known scripting language on the web. It is utilized to improve site pages. Using PHP, you can do things like a login page and login a user by creating session, check details from a form, create forums, picture galleries, surveys, and…

Top 35 PHP Interview Questions and Answers for 5 year experience

PHP interview questions image

This article shows top 35 frequently asked PHP interview questions and answers for 5 years experienced PHP Developer, This list of PHP interview questions and answers will be helpful for PHP 5 experienced developer. Question #1 – How array_walk function works in PHP? It is used to update the elements/index of original array. How: in array_walk, two parameter are required.  original array An callback function, with use of we update the array.  Question #2 – What is the difference between $message and $$message? They are both variables But $message is a…

Job | Urgent_Full Stack(NodeJs /Java/PHP) with Product Base MNC Gurgaon

Full stack developer job image

Experience required for the Job: 1 – 10 years Annual Salary of the Job: 5.00 – 22.00 Lacs Based Company Gurgaon Job Location: Gurgaon # Present Company & Location : # Your current Salary : # Your Expected Salary : # Official Notice Period : # Are you able to join Immediate : # Total Exp. In years and months : # Exp in UI Lead /Tech Lead in Years and months: # Exp. In Java in years and months : # Exp. In PHP in years and months : # Exp. In Node…

Top 35 PHP Interview Questions And Answers for 2 year experience

PHP interview questions image

In this article I am sharing top 35 frequently asked PHP interview questions and answers for experience, This list of PHP interview questions and answers will be helpful for PHP experience developer. Question #1 – What is PHP? PHP is an open source server side scripting language mostly used for web applications. Its easy to learn compare to other programming language. PHP also a object oriented programming language like java, .net and c++. Question #2 – What is the difference between $message and $$message? They are both variables But $message is…

35 Important WordPress Interview Questions And Answers for 2 Year Experience

WordPress interview questions image

In this article I am sharing top 35 frequently asked WordPress interview questions and answers for experienced, This list of WordPress interview questions and answers will be helpful for WordPress beginner who just started their career as WordPress developer, and surely help you during interview session. Question #1 – What is WordPress? WordPress is a free and open source popular blogging tool and a content management system (CMS) based on PHP and MySQL. It is completely free of cost and you can utilize it to make any kind of individual and…

Factorial Program in PHP

PHP factorial program tutorial image

image source : google images The factorial of number n is multiplying given integer with the sequence of its descending positive integers. we denoted the factorial of a number n by n! in mathematics. Here I am writing factorial program in PHP.. Example :- 5! = 5*4*3*2*1 = 120 7! = 7*6*5*4*3*2*1 = 5040   Here are writing the PHP program to find a factorial of a number. <?php function factorial($number){ $factorial = 1; for($x=$number;$x>=1;$x–){ $factorial = $factorial*$x; } return $factorial; } echo ‘factorial is=’.factorial(11); ?>   Output :- factorial…