0% found this document useful (0 votes)
34 views8 pages

PHP Short Questions

The document is a comprehensive introduction to PHP, covering various topics such as PHP syntax, variable declarations, arrays, and functions. It includes multiple-choice questions, true/false statements, and definitions related to PHP, MySQL, and AJAX. Additionally, it addresses form handling, session tracking, and basic concepts of jQuery and JSON.

Uploaded by

Scopy OF
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views8 pages

PHP Short Questions

The document is a comprehensive introduction to PHP, covering various topics such as PHP syntax, variable declarations, arrays, and functions. It includes multiple-choice questions, true/false statements, and definitions related to PHP, MySQL, and AJAX. Additionally, it addresses form handling, session tracking, and basic concepts of jQuery and JSON.

Uploaded by

Scopy OF
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Chapter - 1

INTRODUCTION TO PHP

1. Php stands for_________.


A. Personal home page
B. Hypertext pre processor
C. Personal Home Profile
D. None of above
2. PHP was developed in ________.
A. 1967
B. 1992
C. 1995
D. 1997
3. How to pass a single line comment in PHP?
A. Single backslash (/)
B. Single backslash and astrik sign (/*)
C. Double forward slash (//)
D. Double backslash (\\)
4. PHP tag starts with _____ sign and ends with ____ sign.
A. ?> , < ?
B. < , >
C. <? , ?>
D. <% , ?>
5. PHP variable is define with _______ sign.
A. %
B. +
C. ?
D. $
6. Which one is the valid for variable declaration?
A. $12fine=”hello”;
B. $_1409=”num”;
C. $+*=”addition”;
D. $-*=”multiplication”;

Page 1
7. How to define a variable as a global variable?
A. $a=100;
B. Global a=100;
C. global $a=100;
D. none of the above

8. Which is not a part of PHP Arithmetic Operators?


A. +
B. = = =
C. –
D. *
9. In php, = = = stands for
A. Equals to
B. Assign the value
C. Strictly equals to (compare data types too)
D. None of the above
10. Turnery operator is similar as
A. While loop
B. For loop
C. Switch case
D. If else statement
11. ________ Keyword is used to stop the loop or program.
A. Stop
B. Start
C. Exit
D. Go to
12. Output of the following program will be….
<?php
$std=array(“BCA”, “MCA” , “BBA” , “MBA”);
Echo $std(1);
?>
A. BCA
B. MCA
C. ERROR
D. NAN
13. There are ___ types of an array.
A. 1
B. 2
C. 3
D. 4
Page 2
14. Foreach loop is used for numeric looping. (True/False)
15. Func_num_args() takes 1 agrument (True/False).
16. Gettype() gives the type of an array. (True/False).
17. Settype() sets the type of a variable to another datatype. (True/False).
18. Write down the syntax of turnery operator.
19. What is if else ladder?
20. Define: Switch case.
21. Define: Array.
22. Define: Associative Array.
23. Difference between Associative array and multi-dimensional array.
24. Explain :
A) Strval()
B) Intval()
C) Print_r()
D) Unset()
25. Full form of ASCII.
26. Explain A) CHR() B) ORD() C) ABS()
27. Strlen() gives the _______ of the string.
28. Give names of string functions {any five}
29. Explain strcasecmp().
30. Strispslashes () function works a ___________.
31. Explain echo & print.
32. Difference between echo and print.
33. What is implode() and explode() function.
34. Explain md5() function.
35. Give names of five mathematical functions.
36. Give the output of the following code.
<?php
echo rand ();
echo rand ();
echo getrandmax ();
echo rand (0,20);
echo rand (10,50);
?>
37. Explain is_infinite().

Page 3
38.Explain base_convert().
39.Define checkdate().
40.Explain array functions (any two).
41.What is lsort(), rsort() and assort().
42.Explain array_push() and array_pop().
43.Explain define().
44.Define header().
45.Explain following file handling functions.
a. fopen ()
b. fread ()
c. fwrite ()
d. fclose ()
e. Is_file ()
f. File_exists ()
g. Move_upload_file ()
h. Mkdir ()

Page 4
Chapter - 2
Handling Form and Session tracking

1. _________method & ________ method are two ways the


browser client can send information to the web server.
2. What is php cookies?
3. How to delete a cookies?
4. What is session_start().
5. Which library is used to create an image.
6. True/False header(“Content type : image/gif ”)
7. What is imagefill()
8. What is imagecolorallocate()
9. What is quantifiers in php regular expression.
10. Define ereg()
11. What is ereg_replace(),
12. What is eregi_replace().
13. Define split().
14. Difference between split() and spliti()
15. What is sql_regcase()
16. Define php file uploading.
17. $_FILES is used to upload a file. (true/false).
18. Define mail function
19. Define $_PHP_SELF

Page 5
Chapter - 3
Introduction to mysql

1. Full form of mysql.


2. What is database.
3. Mysql is not easy to use (True/False).
4. Mysql is a collection of databases.(True/False).
5. Mysql stores data in excel sheet (True/False).
6. Define query.
7. Database stores table. (True/False)
8. Write syntax of show all the databases.
9. Write a syntax for check the available tables in a
database.
10. Write a syntax to create a new table named
“students”
11. How to display all the records available in a table.
12. Write a php code to establish a connection with
mysql.
13. Which function is used to find the errors in mysql.
14. _________ function is used to close the connection.
15. Write a syntax to create a database.
16. Write a query to find the lastname of the person
where lastnmae is “sharma”.
17. How to define a primary key.
18. Write a query to insert data into mysql table.
19. What is where clause.
20. What is group by keyword
21. Define order by keyword
22. Write a syntax to update the data into the table
Page 6
23. How to delete a data from the table.
24. What does mysql_query() do.
25. What is mysql_errorno().
26. Which function is used to fetch data into an
associative array.
27. Which function counts the number of rows available
in the table.
28. Define mysql_fetch_object().
29. What is mysql_insert_id().
30. What is mysql_result().
31. What is mysql_list_tables().
32. What is mysql_data_seek().

Page 7
Chapter - 4
Ajax , jquery, json

1. what is ajax?
2. Full form of xml.
3. What is XMLHttpRequest methods
4. What is jquery
5. Who inverted jquery?
6. What is the motto of jquery.
7. How to install jquery
8. Give names of jquery selectors.
9. Define document.ready event.
10. What are jquery events
11. What is jquery .click function.
12. What are jquer effects.
13. What is jquery toggle.
14. What is slideup().
15. What is jquery animate()
16. What is json?
17. What is json serilizable?
18. What is encoding and decoding in json.

Prepared By: Nanda Heena (Student of FYBCA - B Division)

Page 8

You might also like