Priti's Technical Corner

October 4, 2009

PHP-MySQL For Beginners

Filed under: Mysql, PHP — Tags: , — pritisolanki @ 4:24 pm

I have created a quick presentation for PHP-MySQL beginners which will help beginners to understand how to connect to mysql from PHP, how to fetch data etc etc.

To understand – How to do database driven programming with php-mysql please follow following link.


October 3, 2009

PHP Interview Questions

Question 1: What is class?
Answer 1: Class is a collection of variables and method.

Question 2: What is data encapsulation and how to achieve it PHP?
Answer 2: Data encapsulation is hiding the member variables and method from the access of others.In PHP data encapsulation is implementated with concept called Class. Class is the collection of variable and method whoes access to other classes is defined in the class  itself.

Question 3: Can constructors can be inherited in PHP5?
Answer 3: Yes

Question 4: what is the difference between errors and exceptions?
Answer 4: An error is a fatal to the programs’s ability to do its job. Where as an exception is a stituation which is uncommon but recoverable.

Question 5:what is difference between class variables and class constants?
Answer 5: class vairables are declared with keyword static and can be changed.Class constants are declared with keyword ‘const’ and can’t be changed.

Question 6: Can we define value of constant inside methods in a class?
Answer 6: No.Values of constant can be set on;y when it’s deifned.

Question 7:what is concrete class?
Answer 7:concrete class is a term used for class which are not abstract.

Question 8:If a method is declared as abstract then, the class containing must also be declared as abstract?
Answer 8:Yes

Question 9: what is abstract methods?
Answer 9:abstract methods is just a declaration of method signature with keyword ‘abstract’.

Question 10: Can concrete class can have abstract methods?
Answer 10: No

Create a free website or blog at

%d bloggers like this: