PHP Interview Questions Answers| PHP Tutorials | Technical Questions

Recent Question and Answers

ORDER BY [col1],[col2],…,[coln]; Tels DBMS according to what columns it should sort the result. If two rows will hawe the same value in col1 it will try to sort them according to col2 and so on. GROUP BY [col1],[col2],…,[coln]; Tels DBMS to group results with same value of column col1. You can use COUNT(col1), SUM(col1), AVG(col1) with it, if you want to count all items in group, sum all values or view average ....! Database testing basically include the following. 1)Data validity testing. 2)Data Integritity testing 3)Performance related to data base. 4)Testing of Procedure,triggers and functions. for doing data validity testing you should be good in SQL queries For data integrity testing you should know about referintial integrity and different constraint. For performance related things you should have idea about the table structure and design. for testing Procedure triggers and functions you should be able to understand the sam....! Answer: <?php $w3 = "mailto:info@w3answers.com"; preg_match('|.*@([^?]*)|', $w3, $w3output); echo $w3output[1]; ?> ....!
There are a few inbuilt options you can use however, for example getimagesize() can return the mimetype, as does some of the new fileinfo functions. The mime type in getimagesize is stored in 'mime', and can be accessed as shown below. <?php $parts = getimagesize($filename); echo $parts['mime']; ?> or <?php $parts = getimagesize($filename); $allowedMimes = array('image/jpg', 'image/png', 'image/gif'); if(in_array(....! PHP strings can be changed, but the most common practice seems to be to treat strings as immutable.Strings can be changed by treating them as character arrays and assigning directly into them, like this: <?php $my_string = “abcdefg”; $my_string[5] = “X”; print($my_string . “<BR>”); which will give the browser output: abcdeXg ?>   When a user first encounters a page in your application that call ssession start(),a sessionis created for the user.PHP generates a random session identifier to identify the user,and then it sends a set-Cookieheader to the client.By default,the name of this cookie is PHPSESSID,but it is possible to change the cookiename in php.ini or by using the session name() function.On subsequent visits,the client identifies the user with the cookie,and this is how thea application maintains state.
The most widely available HTTP server on the Internet. It supports the PERL and PHP languages. The Apache HTTP Server Project is a collaborative software development effort aimed at creating a robust, commercial-grade, featureful, and freely-available source code implementation of an HTTP (Web) server. The project is jointly managed by a group of volunteers located around the world, using the Internet and the Web to communicate, plan, and develop the server and its related documentation. This project is part o....! PHP arrays are associative arrays with a little extra machinery thrown in. The associative part means that arrays store element values in association with key values rather than in a strict linear index order. (If you have seen arrays in other programming languages, they are likely to have been vector arrays rather than associative arrays.) If you store an element in an array, in association with a key,all you need to retrieve it later from that array is the key value.....! SELECT COUNT(*) FROM tb_nme; ....! describe table_name ....! Ans: There are two ways: 1) sizeof($myarray) - This function is an alias of count() 2) count($array) - This function returns the number of elements in an array. Note if you just pass a simple variable instead of an array, count() will return 1. ....! Mysql is the most popular open source database server right now. It is used by large enteprise level companies and small, single websites. Is mysql actually better? --------------------------------- Mysql 5.0 vs. Microsoft SQL 2005 --------------------------------- Features * Mysql 5.X now offers support for cursors, complete views, and stored procedures. However, Foreign Key support is still in its early stages. * SQL 2005 has native support for xml, multi-dimensional data queryi....! A. $_SESSION[‘foo’] = ‘bar’; B. session_start(); C. session_set_save_handler (‘myopen’, ‘myclose’, ‘myread’, ‘mywrite’, ‘mydelete’, ‘mygarbage’); D. $foo = $_SESSION[‘foo’]; Answer A is correct. Answer B is incorrect because session_start() only activates PHP sessions for the current script. Answer C is incorrect because session_set_save_handler() al....! Yes... Java is a great fit for AJAX! You can use Java Enterprise Edition servers to generate AJAX client pages and to serve incoming AJAX requests, manage server side state for AJAX clients, and connect AJAX clients to your enterprise resources. The JavaServer Faces component model is a great fit for defining and using AJAX components. ....! The main difference between GET and POST is how the form data is passing. Both are used for passing form field values. All the values which is submitted by the GET method will be appended to the URL.Where as POST method send the data with out appending the URL(hidden) In GET Method we can bookmark the URLs where as in POST method its not possible In GET Method there is a limit for passing the data from one page to another(ie 256 characters according to w3c standards)But in POST we can send large amount of data

The main difference between GET and POST is how the form data is passing. Both are used for passing form field values.

All the values which is submitted by the GET method will be appended to the URL.
Where as POST method send the data with out appending the URL(hidden)

In GET Method we can bookmark the URLs where as in POST method its not possible

In GET Method there is a limit for passing the data from one page to another(ie 256 characters according to w3c standards)
But in POST we can send large amount of data

<....!