What are the errors in below code? What will be output and how can you fix it?
PHP | Array error fix | array_merge() The output will be as follows: array(2) { [0]=> int(1) [1]=> int(2) } NULL NULL It will also generate two warning messages as follows: Warning: array_merge(): Argument #2 …
Compare timestamp with date only
SQL | Compare timestamp with date only Timestamp holds Date and Time both with 19 characters. To filter table record with the only date parameter can be achieved by SQL DATE() function. Consider the Employee table …
What are superglobal/global variables ?
PHP | What are superglobal/global variables? Superglobal is out of scope limitation. These variables can be accessed from any function, class, or file without doing anything special such as declaring any global variable, etc. These …
Automatically change the html element size using css.
CSS | Fluid typography Changing size of text, image, div or any html element automatically without using any jquery or media queries. It is a fluid type technique that doesn't require any JavaScript. Using viewport …
What will be the value of $x when given statement execute?
PHP | Statement $x = 3 + "15%" + "$25"? The correct answer is 18. Here’s why: PHP is a loosely typed language, therefore it does automatic type conversion based on the context in which …
What type of inheritance supported by php?
PHP | Inheritance PHP mainly supports two types of inheritance: Single inheritance Multilevel inheritance
How we can increase default timeout of session ?
PHP | Increase default session timeout The "session.gc_maxlifetime" is use to modify the default timout of session. server should keep session data for AT LEAST 1 hour by using the below code. It increase session …
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 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 …
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 …
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 = …
How to upload file in PHP?
PHP | Upload File By using move_uploaded_file() function we can upload file in PHP.The move_uploaded_file() function moves an uploaded file to a new location. This function returns TRUE on success or FALSE on failure. move_uploaded_file(file,newloc) …
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 …
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 …
How can we increase the execution time of a PHP script?
PHP | max_execution_time directive in php.ini file By changing the value of max_execution_time in the php.ini file max_execution_time = 30; // in second By default, the maximum execution time for PHP scripts is set to …