KPIT Technologies PHP Latest Interview Questions

KPIT Technologies Most Frequently Asked PHP Latest Interview Questions Answers

What Is The Functionality Of The Functions Strstr() And Stristr()?

string strstr ( string haystack, string needle ) returns part of haystack string from the first occurrence of needle to the end of haystack. This function is case-sensitive.
stristr() is idential to strstr() except that it is case insensitive.

When Are You Supposed To Use Endif To End The Conditional Statement?

When the original if was followed by : and then the code block without braces.

How Can We Send Mail Using Javascript?

No. There is no way to send emails directly using JavaScript.
But you can use JavaScript to execute a client side email program send the email using the "mailto" code. Here is an example:
function myfunction(form)
{
tdata=document.myform.tbox1.value;
location="mailto:mailid@domain.com?subject=...";
return true;
}

What Is The Functionality Of The Function Strstr And Stristr?

strstr() returns part of a given string from the first occurrence of a given substring to the end of the string. For example: strstr("user@example.com","@") will return "@example.com".
stristr() is idential to strstr() except that it is case insensitive.

KPIT Technologies Most Frequently Asked PHP Latest Interview Questions Answers
KPIT Technologies Most Frequently Asked PHP Latest Interview Questions Answers

What Is The Difference Between Ereg_replace() And Eregi_replace()?

eregi_replace() function is identical to ereg_replace() except that it ignores case distinction when matching alphabetic characters.

How Do I Find Out The Number Of Parameters Passed Into Function9?

func_num_args() function returns the number of parameters passed in.

What Is The Purpose Of The Following Files Having Extensions: Frm, Myd, And Myi? What These Files Contain?

In MySQL, the default table type is MyISAM.
Each MyISAM table is stored on disk in three files. The files have names that begin with
the table name and have an extension to indicate the file type.

The '.frm' file stores the table definition.
The data file has a '.MYD' (MYData) extension.
The index file has a '.MYI' (MYIndex) extension.

If The Variable $a Is Equal To 5 And Variable $b Is Equal To Character A, What's The Value Of $$b?

5, it’s a reference to existing variable.

How To Protect Special Characters In Query String?

If you want to include special characters like spaces in the query string, you need to protect them by applying the urlencode() translation function. The script below shows how to use urlencode():

<?php
print("<html>");
print("<p>Please click the links below"
." to submit comments about FYICenter.com:</p>");
$comment = 'I want to say: "It\'s a good site! :->"';
$comment = urlencode($comment);
print("<p>"
."<a href=\"processing_forms.php?name=Guest&comment=$comment\">"
."It's an excellent site!</a></p>");
$comment = 'This visitor said: "It\'s an average site! :-("';
$comment = urlencode($comment);
print("<p>"
.'<a href="processing_forms.php?'.$comment.'">'
."It's an average site.</a></p>");
print("</html>");
?>

Are Objects Passed By Value Or By Reference?
Everything is passed by value.

What Are The Differences Between Drop A Table And Truncate A Table?
DROP TABLE table_name - This will delete the table and its data.

TRUNCATE TABLE table_name - This will delete the data of the table, but not the table definition.

What Is The Difference Between Characters \023 And \x23?

The first one is octal 23, the second is hex 23.

How Can We Submit Form Without A Submit Button?
We can use a simple JavaScript code linked to an event trigger of any form field. In the JavaScript code, we can call the document.form.submit() function to submit the form. For example: <input type=button value="Save" onClick="document.form.submit()">.

How Can We Create A Database Using Php And Mysql?
We can create MySQL database with the use of mysql_create_db($databaseName) to create a database.

How Many Ways We Can Retrieve The Date In Result Set Of Mysql Using Php?
As individual objects so single record or as a set or arrays.

How Many Ways Can We Get The Value Of Current Session Id?

session_id() returns the session id for the current session.

Can We Use Include ("abc.php") Two Times In A Php Page "makeit.php"?
Yes.

Post a Comment

Previous Post Next Post