“SELECT salary_obtained FROM organization_tbl ORDER BY salary_obtained DESC LIMIT 0,2″… Read more
What is difference between single quotes and double quotes in php ?
When string is in single quotes php will not evaluate it. If there is a string with single quotes and if we place a variable in that it would not substitute its value in string, whereas double quotes support variable expansion.If we place variable in double quotes it would substitute … Read more
How to get the student name got maximum marks in a class?
SELECT student_name from students_tbl WHERE marks_obtained = (SELECT max(marks_obtained) FROM students_tbl)… Read more
Is PHP an interpreted language or compiler language ?
PHP is an interpreted language.… Read more
What is the difference between compiler language and interpreted language ?
Interpreted language executes line by line , if there is some error on a line it stops the execution of script.PHP is an interpreted language.
Compiler language can execute the whole script at a time and gives all the errors at a time It does not stops the execution of … Read more
What is difference between TRUNCATE and DELETE in mysql ?
1: DELETE is a DML(data manipulation language) command whereas truncate is a DDL(data definition language) command.
2 : Truncate is much faster than Delete.
3 : We can not roll back in truncate but in delete we can rollback.
4 : We can not use where clause in truncate but … Read more
What is MYSQL storage engines ?
A storage engine is a software module that a database management system uses to create ,read and update the data from a database.
MySQL supports several storage engines that act as handlers for different table types. MySQL storage engines include both those that handle transaction-safe tables and those that handle … Read more
What is array_multisort() in PHP ?
array_multisort() is using to sort several arrays at once or sort multidimensional array, by one or more dimensions.
In this the associative (string) keys will be maintained but numeric keys will be reindexed.
$array1 = array(23,60,50,70);
$array2 = array(2,3,6,5);
array_multisort($array1 , $array2);
OUTPUT:
var_dump($array1);
array(4)
{
[0] =int(23)
[1] … Read more
How can we get the first element of an array in php ?
We can get the first element of an array by the function current();
$arr = array(‘name’=’Kiran’,’age’=’24’,’profession’=’PHP Developer’);
echo $firstvalue = current($arr);
OUTPUT: Kiran… Read more
What is end function in php ?
$arr = array(‘name’=’Kiran’,’age’=’24’,’profession’=’PHP Developer’);
echo $profession = end($arr);
OUTPUT : PHP Developer… Read more