Thursday, August 6, 2015

php interview

1. What is PHP?

 PHP is a server side scripting language commonly used for web applications. PHP has many frameworks and cms for creating websites.Even a non technical person can cretae sites using its CMS.WordPress,osCommerce are the famus CMS of php.It is also an object oriented programming language like java,C­sharp etc.It is very eazy for learning.

2.How to include a file to a php page? 

We can include a file using "include() " or "require()" function with file path as its parameter.

3.Differences between GET and POST methods ? 

We can send 1024 bytes using GET method but POST method can transfer large amount of data and POST is the secure method than GET method.

4.How to declare an array in php?

 var $arr = array('apple', 'grape', 'lemon');

5.what types of loops exist in php?

 for,while,do while and foreach

6. How to create a mysql connection? 

mysql_connect(servername,username,password);

 7. How to select a database?

 mysql_select_db($db_name);

1 comment:

  1. Connection wale m problem aa rhi thi but now its clear...

    ReplyDelete