PHP Image Rotation

PHP image rotation is one of the features of PHP that we can use the built-in imagerotate() function to rotate images according to the given angle. This function rotates the image from the center by the angle given in its parameter. Parameters: This function accepts four parameters as mentioned above…

Continue Reading...

PHP Resize Image

Sometimes we need to resize images on our website. For example, the size of the image is more than what we need. If your website is created with PHP, the resize image method will be helpful and can be done in two ways in PHP. One uses the Imagick class…

Continue Reading...
PHP String Contains

PHP String Contains (5 Methods)

In this PHP tutorial, we are going to check if a string is inside another string or not (find string in string). There are various functions and methods to check the string contains substrings in PHP, which we will discuss step by step in this tutorial. Why do we need…

Continue Reading...
php validation and sanitization

PHP Validation And Sanitization With Practical Example

One of the things that all websites should pay attention to is their security. One of the methods of hacking websites is SQL Injection and XSS. Websites created with PHP language are not excluded. To prevent these types of attacks, we must check the input data and the output data…

Continue Reading...
php multidimensional array

PHP Multidimensional Array In Depth: Ultimate Guide

A PHP array is a variable that stores more than one piece of related data in a single variable. A PHP multidimensional array is an array containing one or more arrays. Multi-dimensional arrays are such type of arrays that stores another array at each index instead of a single element….

Continue Reading...
php array iteration foreach loop key value array_walk

PHP Array Iteration (7 Methods)

PHP array iteration can be done only by loops and iteration functions, for example, foreach loop with key and value and etc. The PHP foreach construct provides an easy way to iterate over arrays, especially multidimensional array. foreach works only on arrays and objects. Let’s talk about the PHP array…

Continue Reading...
access php array element

Access PHP Array Element

To access the PHP array element value, you can use the array index or the key which is enclosed in square brackets. Accessing elements of an Associative array can be done by key in PHP. PHP comes with three different types of arrays to help you store data. You can…

Continue Reading...
php array copy key value subarray

PHP Array Copy (7 Methods)

PHP array copy is an action to duplicate a PHP array (deep copy and shallow copy). This action can be done in many ways such as = operator, pointer, ArrayObject class, and user-defined function to copy an array with subarray in PHP. There are several built-in PHP functions to copy…

Continue Reading...
php array object class

PHP Array Object

PHP array object class allows objects to work as arrays. Array does not object in PHP but PHP does give us some ways to make objects that act like arrays. First, there is the ArrayObject class which is pretty close to what you have with a normal array (you can…

Continue Reading...