When we have booking date (start date to end date) in db booking table and need to search from “from date” to ” to date” by search box for available seats.
PHP String Interview Question
Question : Find number in a string? preg_replace(“/[^0-9]/”,””,$string); Return string filter_var($str, FILTER_SANITIZE_NUMBER_INT); preg_match_all(‘!\d+!’, $str, $matches); Return an array strpos() : Find the postion in string Example : echo strpos(“I love php, I love php too!”,”php”); Output: 7 strpos() : Finds the position of the first occurrence of a string inside another string (case-sensitive) stripos() : Finds the position…
PHP Array Interview Qutions
Question: What are different type of sorting functions in PHP? sort() – sort arrays in ascending order. $sarray = Array([s] => red [x] => blue [3] => orange ) sort($sarray); print_r($sarray); OUTPUT : Array ( [0] => blue [1] => orange [2] => red ) asort() – sort associative arrays in ascending order, according to…
jQuery Interview Quetions
What is the purpose of ‘this’ operator in JavaScript? JavaScript famous keyword this always refers to the current context. ——————————————— Global Variables − A global variable has global scope which means it is visible everywhere in your JavaScript code. Local Variables − A local variable will be visible only within a function where it is…
PHP Interviwe Question on php.ini file
Five function of PHP.ini file? Maximum limit of all paramitters which we can set in php.ini file? SOME basic functions of php.ini file : ;;;;;;;;;;;;;;; ; File Uploads ; ;;;;;;;;;;;;;;;; ; Whether to allow HTTP file uploads. ; http://php.net/file-uploads file_uploads = On ; Temporary directory for HTTP uploaded files (will use system default if…
htaccess File Interview Quetions
<Directory> </Directory> 400 – Bad request 401 – Authorization Required 403 – Forbidden 404 – File Not Found 500 – Internal Server Error ErrorDocument 404 /filenotfound.html DirectoryIndex index.php3 index.php pictures.pl index.html default.htm ——————– The use of .htaccess files can be disabled completely by setting the AllowOverride directive to none: AllowOverride None ———– mod_rewrite directives must…