CORE PHP PART - 1 PROBABLE INTERVIEW QUESTIONS AND ANSWERS MADE BY ME WHICH ARE GENERALLY ASKED IN vEXPLORE TECHNOLOGIES FOR PHP WEB DEVELOPMENT FOR FRESHERS

CORE PHP PART - 1 PROBABLE INTERVIEW QUESTIONS AND ANSWERS MADE BY ME WHICH ARE GENERALLY ASKED IN vEXPLORE TECHNOLOGIES FOR PHP WEB DEVELOPMENT FOR FRESHERS

Q1. What are superglobals in PHP? Explain $_GET, $_POST,$_SESSION,etc.

Ans: Superglobals in PHP are known as the pre-defined global variables. For ex. : $_SESSION, $_POST,$_COOKIES, $_GET, $_REQUEST, $_FILES, etc.

$_GET = $_GET is the unsecure method. Query string can pass through $_GET method.

$_POST=$_POST is the most secure method. Query string cannot pass through $_POST method.

$_SESSION= $_SESSION is known as the global carrier of data which trace the user activity on website. It is used to send the user information on server. $_SESSION is the unsecure method. $_SESSION does not have any limit. For ex. : Login, Logout, Multipart Form.

Q2. What is the use of header() function?

Ans: header() function in PHP is used to sent the raw HTTP header to the client. For ex. :

header("location:display.php"); ,

header("location:login.php"); , etc.

Q3. How does explode() differ from implode()?

Ans: explode() = explode() function is used to convert from string into array.

For ex. :

<?php
$str="Capgemini was my first company";
$exp=explode(" ",$str);
print_r($exp);
?>

Output :

Array ( [0] => Capgemini [1] => was [2] => my [3] => first [4] => company )

implode() = implode() function is used to convert from array into string.

For ex. :

<?php
$arr="I love Capgemini";
$exp=explode(" ",$arr);
$imp=implode(" ",$exp);
print_r($imp);
?>

Output :

I love Capgemini




Comments

Popular posts from this blog

Programmings Based On Array And String Functions To Merge The 2 Arrays, Then After Merge Convert Into String And Then Find Out The 1st And Last Word From The Reverse String

PHP WEB DEVELOPMENT INTERVIEW QUESTIONS ASKED IN APOLLO HOSPITAL ALONG WITH MY OWN CONCEPTS AND MY OWN EXPLANATION ANSWERS(PART - 1) REST OF THE QUESTIONS AND ANSWERS WILL BE PREPARED BY ME IN MY NEXT BLOG

Mini Project On Multi User CRUD Operations(Create, Read, Update & Delete) Of Donar Details Of Indian Nationals Who Donate To Ramkrishna Math, Belur Math Using PDO (PHP Data Objects) With Proper Explanation Of Each And Every Individual Line Of The Code Of connection.php Page, form.php Page, formaction.php Page, admin_display.php Page, client_display.php Page, edit.php Page, editaction.php Page And delet.php Page (Here You Will Find The Image Of Sayang Sri Ramkrishna Dev, Sayang Sri Ma Sarada Devi & Sayang Sri Swami Vivekananda) In My CRUD Operation