Skip to content

Tag Archives: PHP-basics

Debugging is as important as coding in the field of development. There might occur a case when the developer needs to check information of a… Read More
The PHP Language is an interpreted language, i.e. it is executed statement after statement. By default one characteristic of PHP makes it send HTML as… Read More
A perfect number is a number if it is equal to the sum of its factors,that is original number is equal to sum of all… Read More
Given a number, we need to check whether it is prime or not in PHP. General approach for prime check is discussed here. In this… Read More
The Bitwise operators is used to perform bit-level operations on the operands. The operators are first converted to bit-level and then calculation is performed on… Read More
In a production level code it is very important to keep information as either variables or constants rather than using them explicitly. A PHP constant… Read More
A number is called even if the number is divisible by 2 and is called odd if it is not divisible by 2. Given a… Read More
The Fibonacci series is a series of elements where, the previous two elements are added to get the next element, starting with 0 and 1.… Read More
We already know how to get the factorial of a number in other languages. Let’s see how this is done in PHP using both recursive… Read More
This is a simple PHP program where we need to calculate the sum of all digits of a number. Examples: Input : 711 Output :… Read More
Arrays in PHP is a type of data structure that allows us to store multiple elements of similar data type under a single variable thereby… Read More
Constants are either identifiers or simple names that can be assigned any fixed values. They are similar to a variable except that they can never… Read More
Strings can be seen as a stream of characters. For example, ‘G’ is a character and ‘GeeksforGeeks’ is a string. We have learned about the… Read More
PHP follows few rules and maintains its style of coding. As there are many developers all over the world, if each of them follows different… Read More
A function is a block of code written in a program to perform some specific task. We can relate functions in programs to employees in… Read More