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. …
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 …
PHP Syntax and Tags
PHP | Syntax, and Tags PHP introduces a list of Tags to code PHP. PHP tags allow the PHP parsing engine to get in and get out from the PHP block. A PHP script can …
Unset function in PHP
PHP | unset() function The function unset() is an inbuilt function in in php which is use to delete variable. unset($var) or void unset ( mixed $var [, mixed $... ] ) Note: we can …
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 …
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 type of inheritance supported by php?
PHP | Inheritance PHP mainly supports two types of inheritance: Single inheritance Multilevel inheritance
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 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 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 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 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) …
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 refresh a page with jquery?
Jquery | Location reload() Method | Refresh a page The Location.reload() method reloads the current URL. Syntax location.reload(forceGet) The Location.reload() method reloads the current URL. By default, the value of forceGet is false which …
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 …