Programming - PHP
You Are Here :: Home > Programming > PHP- General Questions
67. |
What is the correct way to create a function in PHP??
|
A. |
createmyFunction() |
B.
|
new_functionmyFunction() |
C.
|
functionmyFunction()
|
D.
|
None of these
|
|
Answer: Option C
Explanation:
|
68. |
What is the correct way to open the file "time.txt" as readable??
|
A. |
fopen("time.txt","r"); |
B.
|
open("time.txt"); |
C.
|
fopen("time.txt","r+"); open("time.txt","read");
|
D.
|
None of these
|
|
Answer: Option A
Explanation:
|
69. |
PHP allows you to send emails directly from a script?
|
A. |
True |
B.
|
False |
C.
|
----
|
D.
|
----
|
|
Answer: Option A
Explanation:
|
70. |
What is the correct way to connect to a MySQL database??
|
A. |
dbopen("localhost"); |
B.
|
mysql_open("localhost"); |
C.
|
mysql_connect("localhost");
|
D.
|
connect_mysql("localhost");
|
|
Answer: Option C
Explanation:
|
71. |
What is the correct way to add 1 to the $count variable??
|
A. |
$count++; |
B.
|
count++; |
C.
|
$count =+1
|
D.
|
++count
|
|
Answer: Option A
Explanation:
|
72. |
What is a correct way to add a comment in PHP??
|
A. |
/*…*/ |
B.
|
<!--…--> |
C.
|
*\..\*
|
D.
|
<comment>…</comment>
|
|
Answer: Option A
Explanation:
|
« prev
next »