pTutorial

New way to learn PHP

PHP interview Questions


Q:-31. What is the use of Perl in PHP?

Perl is known as PHP extension and application repository. It provides the structured library to the PHP users also gives provision for package maintenance.

Q:-32. What are the different function in sorting an array?

sort, arsort, asork, ksort, rsort, natsort, uksort, Array_multisort Etc.

Q:-33. What is the use of in_array() function in PHP?

In PHP in_array function is used to check whether given value exist in an array or not.

Q:-34. How to set cookies in PHP?

Setcookies ("name","php",time()+3600);

Q:-35. What is the difference between PHP and java Script?

The difference lies with the execution of the languages. PHP is a server side scripting language, that means PHP can’t interact directly with the user. Whereas, Java Script is a client side scripting language, that is used to interact directly with the user.

Q:-36. What is the use of "ksort " in PHP?

ksort() function sort is used to sort an arrays key in reverse order.

Q:-37. What is the use of mysql_real_escap_string()?

It is used to escape special character in a string for use in an SQL statement.

Q:-38. What is the difference bitweeb mysql_fetch_array() and mysql_fetch_asoc()?

mysql_fetch_array() function fetch a result row as an associative array while mysql_fetch_asoc() fetches an associative array, a numeric array, or both.

Q:-39. How to redirect a web page in PHP?

Header function is used to redirect from one webpage to another webpage Eg: header("Location:uk.html");

Q:-40. How to redirect a web page after fixed time interval?

Header function is used to redirect from one webpage to another webpage. Example: header( "refresh:7; url=uk.php" );

QUOTES OF THE DAY

We live in this world when we love it.

LIKE ON FACEBOOK

+1 ON GOOGLE

SHARE ON TWITTER