Posts Tagged with '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 6 years, 6 months ago | 2253 views

Tags:- PHP

strstr() and stristr() strstr() and stristr() both are use to find first occurence of a string, but the differences are strstr( ) is case sensitive where as stristr( ) is case insensitive.   strstr() – …

Last updated 6 years, 6 months ago | 3428 views

Tags:- PHP

Enable errors in PHP There are two ways to enable error reporting in your PHP scripts: 1. You can add the following function in the the script: error_reporting(E_ALL); 2. You can add the following option in …

Last updated 6 years, 6 months ago | 2365 views

Tags:- PHP

PHP | What is difference between == and === operator? "==" and "===" The two operators are known as comparison operators. "==" (i.e. equal)  and === (i.e. identical) both are use to check values are …

Last updated 6 years, 6 months ago | 2378 views

Tags:- 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 …

Last updated 6 years, 6 months ago | 2446 views

Tags:- PHP

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 6 years, 6 months ago | 2418 views

Tags:- PHP

PHP | What are data types in PHP? Variables can store data of different types, and different data types can do different things. PHP supports the following data types: String Integer Float (floating-point numbers - …

Last updated 6 years, 6 months ago | 2348 views

Tags:- 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 …

Last updated 6 years, 6 months ago | 2294 views

Tags:- PHP

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 6 years, 6 months ago | 2292 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 6 years, 6 months ago | 2353 views

Tags:- PHP

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 …

Last updated 6 years, 6 months ago | 2339 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 6 years, 6 months ago | 2276 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 6 years, 6 months ago | 2350 views

Tags:- PHP

PHP | How to avoid errors in PHP? We can use PHP inbuilt function error_reporting(0) to avoid all errors in PHP file. <?php error_reporting(0); ?>  

Last updated 6 years, 6 months ago | 2433 views

Tags:- PHP

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 …

Last updated 6 years, 6 months ago | 2316 views

Tags:- PHP