1.

How to remove blank spaces from the string?

Answer»

preg_replace('/\s/', '', 'Best Interview Question');

37. What is the difference between Primary Key and Unique key?
Primary KeyUnique Key
It is used to SERVE as a unique identifier for each row WITHIN a table.Used to determine rows that are unique and not a primary key in a table.
It cannot accept NULL values.Unique Key can accept NULL values.
There is the only scope for one primary key in any table.Multiple Unique Keys can be defined within a table.
The primary key creates a CLUSTERED index.Unique Key creates a non-clustered index.

Note: Our PHP interview QUESTIONS for freshers have been selected from a plethora of queries to help you gain valuable insights and boost your career as a PHP Developer.



Discussion

No Comment Found