To logout users from all devices when the password is changed in PHP, here we will create a good and easy approach to create the script. Here are some major steps which we will follow, At the time of login we will store a random number associated with the user id into the DB and […]
How to Print Multiple Array Values in PHP?
To print multiple array values in PHP, first, we have to merge multiple arrays and store it to a variable. To merge two arrays we use array_merge() function. Here on this task we check two types of multiple arrays and merge those to print complete value. Example with indexed arrays. And with associative arrays. Example […]
Get Client MAC or Physical And IP Address Using PHP
Before we get started with Get Client MAC or Physical And IP Address Using PHP, first, we have to know some general details about Mac and IP address of the system. What is a MAC address? MAC stands for Media Access Control and it is also known as the physical address. Which is associated with […]
PHP trim() Function With Multiple Examples
PHP trim() function is mainly used to trim or remove whitespace from the start and end of the string. We can also use it in various ways which we learn from this complete article. PHP trim() function is an inbuilt PHP function. There are also two types of trim function, rtrim removes whitespaces and other […]
PHP str_replace Function | Complete Guide
In this tutorial, we learn PHP str_replace Function with help of multiple types of examples. How we can use the PHP str_replace function at the time of development. Here are some important points which we will discuss in this tutorial, Example of PHP string replace. How to use PHP str_replace with arrays. PHP str_replace to […]
PHP file_get_contents() Function With Example
In this tutorial, we learn how we can get the complete string from any URL or from any text file by using PHP file_get_contents() Function with using multiple examples. Introduction and Usage Mainly, the file_get_contents() Function is used to read strings from the entire file. This is a feasible way to read the complete file […]
Complete Concept of PHP in_array() Function
Introdcution PHP in_array() function is an inbuilt function in PHP. As the name suggests in_array() function means, this function checks user-defined element is available in the array or not. So, basically, if we define in_array function in technical language, then we can say “The PHP in_array function checks whether the given value exists in an […]
PHP password_hash, password_verify With Example
Introduction PHP password_hash is a built-in function that is majorly used to encrypt the password string. Encryption has c combination of random letters, numbers, and special characters. PHP password_hash() function can create a unique password hash using a strong hashing algorithm which is only one-way hashing or encryption. One-way hashing means, that generated password can […]
What is Dependency Injection in PHP With Example
Introduction If you are also curious and think too much about Dependency Injection in PHP, we can learn about PHP Dependency Injection in our layman language. In Dependency Injection, both are common words with known meanings. Dependency means something is dependent on another thing and if we complete that dependency with the help of a […]