PHP | Check data type in php | gettype() | var_dump() By using gettype() function we can check the data type of a variable. we can also use var_dump() function for the same.   gettype() <?php echo …

Last updated 3 years, 1 month ago | 645 views

Tags:- PHP

What is difference between require() and include() ? The require() function is identical to include(), except that it handles errors differently. If an error occurs, the include() function generates a warning, but the script will …

Last updated 3 years, 1 month ago | 644 views

Tags:- PHP

PHP | How to convert a string to an array? string to array There is a function in PHP called explode() which is used to convert any string to an array.    <?php $str = …

Last updated 3 years, 1 month ago | 642 views

Tags:- PHP

Chart.js | Add bar chart in the webpage This is a simple example of using Chart.js to create a bar chart on the webpage.  Step 1: Create a basic HTML file called "chart.html"  <!DOCTYPE html> …

Last updated 2 years, 4 months ago | 636 views

Tags:- HTML JQuery JavaScript Chart

Django | order_by query set, ascending and descending order_by() The order_by function is used to sort the result-set in ascending or descending order. Ascending Order The order_by function sorts the records in ascending order by …

Last updated 1 year, 3 months ago | 635 views

Tags:- Django

PHP | How to convert an array to a string? array to string By using implode function we can convert any array to string.  In implode function first parameter is separator which specifies what to …

Last updated 3 years, 1 month ago | 633 views

Tags:- PHP

PHP |What is the difference between echo and print? PHP echo and print both are used to display the output in PHP. Both can be used with or without parenthesis. The differences are small echo …

Last updated 3 years, 1 month ago | 632 views

Tags:- PHP

PHP | output of $a and $b once this code $a = '1'; $b = &$a; $b = "2$b" executed; Both $a and $b will output a string "21".   Because the statement $b = &$a; sets …

Last updated 2 years, 8 months ago | 631 views

Tags:- PHP

PHP | :: operator | scope resolution operator This operator is known as the scope resolution operator. And this operator is used to access the static members of the class. To access static members of a …

Last updated 3 years, 1 month ago | 623 views

Tags:- PHP

PHP | require() and require_once() Both require() and require_once() is use to include a file but the difference is required_once() function checks if the file already included or not where  require() function does not check. …

Last updated 3 years, 1 month ago | 609 views

Tags:- PHP

Bellow code is used for the same $date1 = date(‘Y-m-d’); $date2 = ‘2006-08-15’; $days = (strtotime($date1) – strtotime($date2)) / (60 * 60 * 24); echo $days;  

Last updated 3 years, 8 months ago | 594 views

Tags:- PHP

SQL | Difference between primary key and unique constraints There is only one primary key in a table. It creates the clustered index automatically and it cannot have NULL value whereas there can be multiple …

Last updated 2 years, 12 months ago | 563 views

Tags:- SQL MySQL

DATEDIFF function is use for finding the number of days between two given dates using MySQL DATEDIFF(‘2018-03-07′,’2017-01-01’)  

Last updated 3 years, 8 months ago | 546 views

Tags:- MySQL

Git add | add files to git This command adds the working directory changes to the staging area. It allows to include the updates to a particular file in the next commit. Git add doesn't affect …

Last updated 1 year, 2 months ago | 546 views

Tags:- Git

Python | Ternary Operator python uses an if-else conditional statement in a single line to represent the Ternary Operator. [true] if [expression] else [false]   Let's see an example of Ternary Operator a, b = …

Last updated 1 year, 4 months ago | 534 views

Tags:- Python