1 When uploading a file using HTTP, which variable can be used to locate the file on PHP's local filesystem?
Answer...
None of the above
$_FILES['fieldname']['tmp_name']
$_FILES['fieldname']
$_FILES['fieldname'][0]['filename']
$_FILES['fieldname']['filename']
ans : $_FILES['fieldname']['tmp_name']
2 Which of the following SQL statements will improve SQLite write performance?
Answers: (choose 2)
PRAGMA locking_mode = "Row";
PRAGMA count_changes = Off;
PRAGMA default_synchronous = Off;
PRAGMA default_synchronous = On;
PRAGMA locking_mode = "Table";
Ans:
3 What is the best way to iterate and modify every element of an array using PHP 5?
Answer...
You cannot modify an array during iteration
for($i = 0; $i < count($array); $i++) { /* ... */ }
foreach($array as $key => &$val) { /* ... */ }
foreach($array as $key => $val) { /* ... */ }
while(list($key, $val) = each($array)) { /* ... */
4 What is the primary benefit of a SAX-based XML parser compared to DOM?
Please answer through the comments I will make it publish on blog..............
[Thursday, February 21, 2008
|
6
comments
]
Popular Posts
- MySQL stored procedure&triggers
- php questions
- Php Questions
- How we canmove into last changed position on info window close event On google map
- Pattern Matching in mysql
- MySQL INDEX
- MYSQL joins
- Jquery based dynamic adding and removal of html elements.
- securing a form with captcha
- Comparing a date with current date
6 comments
for($i = 0; $i < count($array); $i++) { /* ... */ } is correct answer
for question 2:
PRAGMA count_changes = Off;
PRAGMA default_synchronous = Off;
for question 1:
$_FILES['fieldname']['tmp_name']
nkhanchandani said...
for($i = 0; $i < count($array); $i++) { /* ... */ } is correct answer
for($i = 0; $i < count($array);
Sorry, I don't think so.
for($i = 0; $i < count($array); $i++) { /* DO WHAT EXACTLY??? */ }
Can you give an example simpler than...
$array =range('A', 'Z');
foreach($array as $key=> &$value){
$value= $i++;
}
print_r($array);
tjmcd1963, read that - What is the best way to iterate and MODIFY
foreach needs array_keys to modify input array, so the right answer is for(...)
Post a Comment
Please put your comments here. your questions, your suggestions, also what went wrong with me.