How to convert an array to string ?
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 …
Print Triangle pyramid pattern in python
Python | Print Triangle pyramid pattern This is an example of how to print the Triangle pyramid pattern. It takes an input number from the user to print the number of rows for the pattern. n …
Git add to add files to git
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 …
What is difference between require() and include() ?
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 …
Git branch command to create, list and delete
Git | Git branch command to create, list, and delete git branch command is used to create a new branch, list all branches, and delete a branch. Branches allow developers to work on the same project …
How can we increase the speed of a MySQL select query?
MySQL | Increase the speed of a MySQL select query For increasing the speed of a query we have to do a couple of things First of all instead of using select * from table1, use …
How many types of messages can you log in Codeigniter?
Codeigniter | Types of error logging There are three message types in Codeigniter: Error Messages These are actual errors, such as PHP errors or user errors. Debug Messages These are messages that assist in debugging. …
How can we find or count number of elements in an array?
PHP | Count number of elements in an array There are two ways to find the number of elements in an array: 1. sizeof($arr), This function is an alias of count() echo sizeof($arr); 2. count($arr) echo …
What is difference between echo and print?
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 …
Select date range from timestamp column
SQL | Timestamp in where clause to select the date range Select date range from the timestamp column with where clause can be done by using the BETWEEN operator. BETWEEN Operator : The BETWEEN operator selects …
Program to check palindrome in python
Python | Check whether the given value is palindrome or not This is an example of how to check whether the given value is palindrome or not. It takes input from the user to check …
Adding element in an array in php
PHP | array_push() function We can add elements to an array in an easy way. There is an inbuilt function array_push() in PHP which is used to add elements to the PHP array. With the …
How to clone git repository
Git clone | clone git repository Git clone command creates a local copy of the existing source code from a remote repository. git clone ssh://[email protected]/<username>/<repository-name>.git To clone a project from Github: Click on the green button …
Delete records in Django models?
Django | Delete records in Django models Delete query performs an SQL delete query on all rows in the queryset and returns the number of objects deleted and a dictionary with the number of deletions …
Django order_by query set
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 …