PHP Interview Question and Answers

56. What is the basic syntax of Php?
  <?php
?>
 
Your Name Your Email-ID
Your Answer
57. What is the use of Php variables?
  Variables are used for storing values, such as numbers, strings or function results, so that they can be used many times in a script.
 
Your Name Your Email-ID
Your Answer
58. How can you associate a variable with a session?
  You set an element in the superglobal $_SESSION array.
 
Your Name Your Email-ID
Your Answer
59. How would you open a directory for reading?
  The opendir() function enables you to open a directory for reading.
 
Your Name Your Email-ID
Your Answer
60. Which function would you use to determine the length of a string?
  The strlen() function returns the length of a string.
 
Your Name Your Email-ID
Your Answer
123456789101112


131415161718 Page 13 of 18