Comments in PHP
PHP | Comments A comment in PHP code is a line that is not executed as a part of the program. It's only read by someone who is looking at the code. By reading the comments …
How do you define a constant in php?
Constant in PHP The define() function is used to defining a constant in PHP define("GREETING", "Welcome to StudyZone4U.com"); Constants are like variables except that once they are defined they cannot be changed or undefined …
Converting array of objects to array in php
PHP | Converting array of objects to array Array of objects look like this: Array ( [0] => stdClass Object ( [id] => 1 [name] => Ram [roll] => 12 ) [1] => stdClass Object ( …
How to remove HTML tags from a string in PHP?
PHP | strip_tags() function strip_tags() function is use to remove HTML, XML, and PHP tags from string. The function provides you the ability to remove tags from strings. You can also ignore certain tags by …
In which files routes are defined in Codeigniter?
Codeigniter | routes Routing rules are defined in your application/config/routes.php file. In it, you'll see an array called $route that permits you to specify your own routing criteria. Routes can either be specified using …
What is PHP Variables
PHP | Variable A variable is a user define keyword which is used to store value like string, number, and array. Once a variable is defined then we can use it one or more than …
What is JQuery?
jQuery: jQuery is a fast, small, and feature-rich JavaScript library. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude …
Find nth largest salary from employees table?
By using following query we can find out the nth largest salary from employees table. SELECT salary FROM `employees` ORDER BY salary DESC LIMIT 1 OFFSET n-1 In the above query n is replaced by …
Sort an array of arrays by date in PHP
PHP | Sort an array of arrays by date in PHP Here a situation in which we have to sort an array of the array by date. An array of arrays is a multidimensional array in …
How we can find last insert id in table?
MySQL | Find last insert id in the table By using the MySQL function mysqli_insert_id() we can retrieve the last inserted id in the database table. <?php $con = mysqli_connect("localhost","user_name","user_password","db_name"); if (mysqli_connect_errno()) { echo …
What is access specifiers in php?
PHP | Access specifiers An access specifier is a code element that is used to determine which part of the program is allowed to access a particular variable or other information. There are three …
How to get an AWS KMS Key description in python with boto3
Python | Get an AWS KMS Key description in python with boto3 The describe_key() function is used to get the key description. It takes KeyArn and returns a dictionary having KeyMetadata. These are some necessary items …
What are the 3 different ways in PHP to connect with MySQL?
The three different way in PHP to connect with MySQL is: MySQL MySQLI PDO Note: We should use MySQLI because MySQLI is imporoved version of MySQL and have more function then MySQL.
Export and import database using SSH
SSH | Export and Import Large Database OR Table Using SSH can be a good practice to manage the files and databases on your account. It is most important to use in the following circumstance …
Web Scraping with PHP
PHP | Web Scraping Web scraping is used to get specific data from another website when there is no API available for it. There are many techniques for web scraping. You can read more about this …