PHP stand for Hypertext Preprocessor. PHP is a Server Side Scripting Language. PHP is an Open Source Software. PHP is free to download and use. PHP scripts are executed on server. PHP supports many databases such as MYSQL, Informix, Oracle, Sybase, Solid,PostgreSQL, Generic ODBC, etc.
2. What is the method available in form submitting?
GET and POST.
3. What are the differences between GET and POST methods in form submitting?
On the server side:
the main difference between GET and POST is where the submitted is stored. The $_GET array stores data submitted by the GET method. The $_POST array stores data submitted by the POST method.
4. How many ways we can pass the variable through the navigation between the pages?
Register the variable into the session
Pass the variable as a cookie
Pass the variable as part of the URL
5. What are the different functions in sorting an array?
6. How can we know the total number of elements of Array?
Note: If we just pass a simple variable instead of a an array it will return 1.
7. Define PHP header() Function
The header() function sends a raw HTTP header to a client.
It is important to notice that header() must be called before any actual output is sent.
Prevent page caching:
8. How can we create a database using php?
9. Explain include(), include_once, require() and require_once.
include() The include() function takes all the content in a specified file and includes it in the current file. If an error occurs, the include() function generates a warning, but the script will continue execution.
include_once() File will not be included more than once. If we want to include a file once only and further calling of the file will be ignored then we have to use the PHP function include_once().
require() The require() function is identical to include(), except that it handles errors differently. The require() generates a fatal error, and the script will stop.
require_once() The required file is called only once when a page is open and further calling of the file will be ignored.
10. What are the Formatting and Printing Strings available in PHP?
printf() Displays a formatted string
sprintf() Saves a formatted string in a variable
fprintf() Prints a formatted string to a file
number_format() Formats numbers as strings