- What's the difference between include and require?
When file is not found by require(), it will raise fatal error and stop the execution of script while include() generate a warning , but execution will continue.
- What is difference between require_once(), require() and include()?
require() includes and evaluates a specific file, while require_once() does that only one time if it has not been included earlier (on the same page). So, require_once() is used when you don't include the file more than one times on same page.
- Differences between GET and POST methods ?
Using GET method we can send 1024 bytes but POST method can transfer large amount of data. GET method shows the data in url while POST does not show the data in URL. .
- What is the difference between Session and Cookie?
Session stored on server while cookies stored on client machine.We can set expiry date for a cookie while session remains active till the browser is open than it get expire.
- How we can retrieve the data in the result set of MySQL using PHP?
- what is the use of isset() in php?
isset() function is used to check the variable is set and is not NULL
- Difference between mysql_connect and mysql_pconnect?
mysql_pconnect() makes a persistent connection to the database which means a SQL link that do not close when the execution of your script ends.
mysql_connect() is used only for the new connections while mysql_pconnect function would first try to find a existing connection with the same host. If found a refrence will be returned instead of opening a new connection.In mysql_pconnect the connection to the SQL server will not be closed after ending of scripts. Instead, the link will remain open for future use.
- What is difference between mysql_fetch_array(),mysql_fetch_row() and mysql_fetch_object() ?
mysql_fetch_array(): return values as both an associative and numeric array.
mysql_fetch_row(): return values as an numeric array.
mysql_fetch_assoc(): return values as an associative array.
mysql_fetch_object: Fetaches a result row as object.
- What is the difference between echo and print?
Echo is used to print out a string. It can have multiple parameters as well. print is a construct, it returns TRUE on successful output and FALSE there is no output.
- What does PEAR stands for?
PEAR stands for â€œPHP Extension and Application Repositoryâ€. it extends PHP and provides a advance programming for web developers.
- How can we retrive the data sent through the URL with the GET or POST method?
Through $_GET["var"] and $_POST["var"] arrays we can receive the data in PHP page.
- What does the unlink() function means?
The unlink() function deletes the file given as entry.