42. How many ways can we get the value of current session id?
ans:-
session_id() returns the session id for the current session.
43. How can we destroy the session, how can we unset the variable of a session?
Ans:-
session_unregister -- Unregister a global variable from the current session
session_unset -- Free all session variables
44. How can we destroy the cookie?
Ans:-
Set the cookie in past
45. How many ways we can pass the variable through the navigation between the pages?
Ans:-
GET or QueryString and POST
46. What is the difference between ereg_replace() and eregi_replace()?
Ans:-
eregi_replace() function is identical to ereg_replace() except that this ignores case distinction when matching alphabetic characters.eregi_replace() function is identical to ereg_replace() except that this ignores case distinction when matching alphabetic characters.
47. What are the different functions in sorting an array?
Ans:-
Sorting functions in PHP,
asort-http://www.php.net/manual/en/function.asort.php
arsort-http://www.php.net/manual/en/function.arsort.php
ksort-http://www.php.net/manual/en/function.ksort.php
krsort-http://www.php.net/manual/en/function.krsort.php
uksort-http://www.php.net/manual/en/function.uksort.php
sort-http://www.php.net/manual/en/function.sort.php
natsort-http://www.php.net/manual/en/function.natsort.php
rsort-http://www.php.net/manual/en/function.rsort.php
48. How can we know the count/number of elements of an array?
Ans:-
2 ways
a) sizeof($urarray) This function is an alias of count()
b) count($urarray)
interestingly if u just pass a simple var instead of a an array it will return 1.
[Friday, December 21, 2007
|
0
comments
]
Popular Posts
- php questions
- some php questions
- How to create a plugin in elgg.
- php Questions
- Mysql query for searching a value, add weightage on the number of occurances and sort based on the weight-age
- Contact Me
- solving the packaging problem in PHP
- How to add or remove WWW on URLs using htaccess.
- php questions
- Inserting nodes into xml files using XML DOM in PHP .
0 comments
Post a Comment
Please put your comments here. your questions, your suggestions, also what went wrong with me.