| 0 comments ]

1 What is the best approach for converting this string:

$string = "a=10&b[]=20&c=30&d=40+50";

Into this array?


array(4) {
["a"]=>
string(2) "10"
["b"]=>
array(1) {
[0]=>
string(2) "20"
}
["c"]=>
string(2) "30"
["d"]=>
string(5) "40 50"
}


Answer...
Write a parser completely by hand, it's the only way to make sure it's 100% accurate
Use the parse_str() function to translate it to an array()
Pass the variable to another PHP script via an HTTP GET request and return the array as a serialized variable
Just call unserialize() to translate it to an array()
Write a string parser using strtok() and unserialize() to convert it to an array


2 SQL Injections can be best prevented using which of the following database technologies?

Answers: (choose 1)
All of the above
Prepared Statements
Persistent Connections
Unbuffered Queries
Query escaping

3 Name three new extensions in PHP 5


Answers: (choose 3)
tidy
soap
java
curl
mysqli

4 Which of the following is not a valid fopen() access mode:


Answer...
b
x
a
w
r+


Please answer through the comments I will make it publish on blog..............

0 comments

Post a Comment

Please put your comments here. your questions, your suggestions, also what went wrong with me.