Q1.Can we write windows like applications in PHP.
Ans : Yes using PHP-GTK on linux and WinBinder on windows.
Q2.What difference does it make when I declare variables with $ and $ in prefix.
Ans: $x = "Lion";
$$x = "Zebra";
echo $Lion;
would display "Zebra"
Use : creating runtime variables
Q3.What is the difference between strpos and stripos function
Ans: strpos is case sensitive search, and stripos is case insensitive search
Q4.What are the ways by which we can find out if a variable has been declared?
Ans: isset or empty language constructs
Q5.What is "global" and how to use it?
Ans: variables declared outside the functions can be used inside the function using global keyword
Q6.What is the difference between echo and print
Ans: echo can take more than one parameter for displaying.
print cannot take more than one
e.g
echo 'This', 'That' //is valid
print 'This', 'That' //is invalid
print returns 1 always.
echo cannot be used to return anything
$ret = print "Abcd" //valid
$ret = echo "Abcd" //invalid
[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.