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 …
How to find the length of a string in PHP?
PHP | Length of a string There is a string function called strlen() which is used to find the length of a string. It accepts a string that returns the length of the given string. …
What is difference between require() and require_once() ?
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. …
How to send mail in PHP ?
Send mail in PHP The mail() function allows you to send emails directly from a script. mail(to,subject,message,headers,parameters); Description of parameters to Required. Specifies the receiver's email id subject Required. Specifies the subject of the …
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 …
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 …
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 …
What are scopes of variable in php?
PHP | What are the scopes of variables in PHP? Scopes define the visibility of a variable. In PHP, variables can be declared anywhere in the script. The scope of a variable is the part …
What are cookies in PHP?
PHP | What are cookies in PHP? A cookie is a small piece of information store by the browser on the client location and sent to the server with every request. It stores a limited amount …
What will be the output of $a and $b once code bellow is executed?
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 …
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 …
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 :: operator and in what case we use it in 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 …
Differentiate between new and override modifiers.
Python | New and Override Modifiers The new modifier is used to instruct the compiler to use the new implementation and not the base class function. The Override modifier is useful for overriding a base class …
Ternary Operator in Python
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 = …