All Questions
nl2br inserts HTML line breaks(<br/>) before all new lines in a string .e.g :<?php echo nl2br(&ld
Ajax is termed asAsynchronus javascriptandXML.It is used for creating fast and dynamic web pages.With ajax
1 :HTMLstands forHyperText Markup Languageand an application of SGML(Standard Gneralized Markup Language ). Wherea
The main reason behind selectingLAMP is :All are open sources and free to use.The security of LINUX is much more than windows operating system.
InCLI we have to provide the script file name started with PHP tag as a command line argument and it runs after press enter .e.g :
Magic methodsare very easy to identify, that every magical method name is started with double underscore( __)sign. We can not declare any user-defined functions with
GET Method: 1) All the name value pairs are submitted as a query string in URL. 2) It's not secured. 3) Length
InCLI we have to provide the script file name started with PHP tag as a command line argument and it runs after press enter .e.g :
Keywordspublic,protected and privateare the three types of access control modifiers in php.With the help of these keywords we can manage the
Keywordspublic,protected and privateare the three types of access control modifiers in php.With the help of these keywords we can manage the
Public :The items which are declared public can be access from everywhere ie access from inside the class ,access in inherited class an
We can get the browser properties in PHP by :<?php$_SERVER ['HTTP_USER_AGENT'] ;?>
$firstdate = "2010-10-07";$seconddate = "2014-03-10";
The functionget_included_files () function is used to get the names of all required and included files in a page . It returns an array with t
End function can set the pointer of an array to the last element of array.e.g :<?php$arr
We have two functions to get the number of elements in an array iecount() and sizeof().Synatx:count($array_
Strposused to find the first occurrence of a string in another string.It return the position of the substring in a string . If the searched string will not exi
We can destroy session by: <?php session_destroy() ; ?> To delete a specific session variable we use <?php sessi
In PHP mail () function is used to send mails.Syntax:mail (to , subject ,message ,headers, parameters);
The ternary operator is a short form of doing if statement. We called it ternary operator because it takes three operands ie. 1 – condition , 2- result for true ,3 –result for
There are 5ready state in ajax. these are : ready state 0: request not initialized ready state 1: server connection established ready
array_flipexchange the keys with their associated values in array ie. Keys becomes values and values becomes keys.<?php$arrayName&am
When string is in single quotes php will not evaluate it . If there is a string with single quotes and if we place a variable in that it would not substitute its value in string,&nbs
We can resolve these errors throughphp.inifile or through.htaccessfile.1. Fromphp.ini&nbs
We can get the first element of an array by the functioncurrent();<?php$arr&nb
strstr and stristr both are used to search for the first occurrence of a string inside another stringDifference:the strstr function iscase
<?php $array1 = array("a" => "green", "red", "blue", "red"); $array2 = array("b" => "green", "yellow", "red"); $result = array_diff
A web page is composed of two parts, the header and the body. An error is seen like something: Warning: Cannot modify header inf
Theextract()function imports variables into the local symbol table from an array.
List()function is used to assign values to a list of variable in one operation and list only works on numerical arrays.
List()function is used to assign values to a list of variable in one operation and list only works on numerical arrays.
$thisis called pseudo variable and this is availabel when a method is called from within an Object context.
The default session timeout is 24 minutes (1440 seconds),
With autoloadersPHP is given a last chance to load the class or interface before it fails with an error.spl_autoload_register()function registers any num
To refresh the page using HTML we can use META to refresh the page or to redirect to other page after certain period of time.
Here we are giving the search string in a variable and in substr() function we will provide the length of the string we are searching for. we can search for a single character also and edi
We can get a file extension in following ways.
var_dumpfunction displays structured information about variables including its type,size and value e.g: <?php
OUTPUT: 3 STRSPN returns the number of matches found in the string.
OUTPUT : 5 PHP will consider 024 as octalnumber which is equivalent to decimal 20