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 […]
Send Email in JavaScript Using SMTP with Example
To Send Email in JavaScript Using SMTP (Simple Mail Transfer Protocol), we will use JavaScript SMTP CDN and Gmail app password as credentials. Here are the given major things we will use to send an email in JavaScript using SMTP, SMTP JS CDN library Google App Password Here you can check how we can create a google […]
How to check if an array is empty, NULL, or undefined in jQuery?
To check if an array is empty, NULL, or undefined in jQuery and JavaScript, we use two major functions, jQuery.isEmptyObject(arrayVariable) length property To check, if an array is undefined we use typeof JS operator. And by using jQuery of JS length property we can check the length of the array, to check it is empty […]
Sum of all duplicate values in an array using JavaScript
Also Read: for-Each In JavaScript With Example Here we create a program to find Sum of all duplicate values in an array using JavaScript. In the above source code, first, we define an indexed array where we want to find duplicate values of an array. Now, we define two variables sum and result. Then we […]
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 Special Characters from String in jQuery
To Get Special Characters from String in jQuery we use the string indexOf function. Also Read: 7 Most Useful JavaScript Array Functions Here are the major steps which we used to get, Store possible special characters into a variable. Define a empty array to store characters to show. Use loop to check and get all […]
Convert Unix timestamp to DateTime jQuery And JS
To Convert Unix timestamp to DateTime using jQuery and JS, we use the JavaScript date object and other date functions to get the time and date with months. Here are 4 steps to convert timestamp to DateTime using jQuery and JS, Convert timestamp to milliseconds. Place the milisecond value as argument in the date object. […]
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 […]
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 […]