Tag Archives: PHP-basics

Most often we need to store a complex array in the database or in a file from PHP. Some of us might have surely searched… Read More
The hex2bin() function is a built-in function in PHP. The hex2bin() function is used to decode a hexadecimally encoded binary string. That is, it decodes… Read More
The settype() function is a built-in function in PHP. The settype() function is used to the set the type of a variable. It is used… Read More
We have to print an arithmetic progressive series in PHP, between two given numbers a and b both including, with a given common arithmetic difference… Read More
You are given an array of n elements in PHP. You have to separate the elements from the array based on the elements are odd… Read More
You are given an array of strings. You have to change all of the strings present in the given array to uppercase no matter in… Read More
We already have learnt about file inclusion in PHP in the article PHP | (Include and Require). We have discussed about include() and require() functions… Read More
The filter_var() function filters a variable with the specified filter. This function is used to both validate and sanitize the data. Syntax :- filter_var(var, filtername,… Read More
We are given an array which consists of multiple dates in (Y-m-d) format. We have to write a program in PHP to sort all the… Read More
The term PHP is an acronym for PHP: Hypertext Preprocessor. PHP is a server-side scripting language designed specifically for web development. Websites like www.facebook.com, www.yahoo.com… Read More
We already have discussed about variables and global variables in PHP in the post PHP | Variables and Data Types. In this artile we will… Read More
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