<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6027565613860287103</id><updated>2012-02-16T12:24:43.851-08:00</updated><title type='text'>PHP MYSQL  Interview Questions Answers</title><subtitle type='html'>learn php mysql in easy way</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://phpgreat.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6027565613860287103/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://phpgreat.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>web Scientist</name><uri>http://www.blogger.com/profile/15599908111812889832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6027565613860287103.post-808527341860974352</id><published>2008-08-02T12:58:00.000-07:00</published><updated>2008-08-02T13:02:10.405-07:00</updated><title type='text'>PHP INTERVIEW QUESTIONS LATEST</title><content type='html'>&lt;a href="http://www.uvr1.com/see/"&gt;PHOTOGRAPHY&lt;/a&gt;        &lt;a href="http://www.uvr1.com/ip/"&gt;KNOW UR IP&lt;/a&gt;         &lt;a href="http://www.uvr1.com/DIAMONDS/"&gt;DIAMONDS GOLD&lt;/a&gt;         &lt;a href="http://www.uvr1.com/BeautifulQuotes/"&gt;Beautiful Quotes&lt;/a&gt;      &lt;a href="http://uvr1.com/MARRIAGE/harmful-effects-pornography.htm"&gt;Negative thoughts can kill U&lt;/a&gt;       &lt;a href="http://healthcause.googlepages.com/"&gt; &lt;/a&gt;&lt;a href="http://replyindia.googlepages.com/today"&gt;TIPS 4 U&lt;/a&gt;        &lt;a href="http://jobsgreat.blogspot.com/"&gt;JOBS&lt;/a&gt;         &lt;a href="http://time.uvr1.com/"&gt;TIME MANAGEMENT&lt;/a&gt;       &lt;a href="http://makaanpoint.uvr1.com/"&gt;REAL ESTATE - own  a House or flate here  &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Q.1 How does a Web work at a fundamental level ?&lt;br /&gt;Ans. When a typical HTTP client visit a URL through the web browser, the browser sends an HTTP request to the web server. The web server responses to this request with the resource that is desired. When the browser receives this response, it will render the web page.&lt;br /&gt;Q.2 What is the code to instruct PHP to use your own session-handling functions? (For opening, closing, reading, writing, deleting and garbage collection.)&lt;br /&gt;Ans. session_set_save_handler ('myopen',  'myclose',  'myread',  'mywrite',  'mydelete',  'mygarbage') ;&lt;br /&gt;Q.3 In PHP, how is "serialization" of Arrays takes place?&lt;br /&gt;Ans. In PHP, serialization is done by two functions:&lt;br /&gt; 1. Serialize () renders the array in a format that can be safely saved to any container (such as a database field or a file) capable of handling textual content.&lt;br /&gt; 2. Unserialize() takes a serialized input and rebuilds the array in memory.&lt;br /&gt;Q.4 What will be the following script output?&lt;br /&gt;    &lt;?php            $array = array ( 1 =&gt; 10, 'test' =&gt; 'a test string', 200 );            echo "Sorting in ascending order: \n";            ksort ($array, SORT_STRING);            var_dump($array);     ?&gt;&lt;br /&gt;Ans. array(3) {        [1] =&gt; int(10)        [2] =&gt; int(200)        ["test"] =&gt; string(13) "a test string"                   }&lt;br /&gt;Q.5 What is the code to grab the local part of an email address (the part before the @ character)?&lt;br /&gt;Ans. $local_part = substr($email, 0, strpos($email, &lt;a href="mailto:"&gt;'@'&lt;/a&gt;));&lt;br /&gt;Q.6 What do you understand by Inheritance?&lt;br /&gt;Ans. Inheritance is the capability to derive new classes from existing ones. A derived class inherits the instance variables and methods from the base class(or a "superclass") and could add new instance variables and methods. If the new methods are defined with the same name as those in the base class,the new methods will override those defined in the superclass.&lt;br /&gt;Q.7 What do you understand by Session?&lt;br /&gt;Ans. Session is a mechanism for persisting information between page requests from a particular user.After calling session_start(), data stored in the $_SESSION superglobal will continue to be accessiblein future page requests from a client identified by a cookie, POST variable or GET parameter.&lt;br /&gt;Q.8 What is ternary operator?&lt;br /&gt;Ans. The ternary operator is a shorthand version of an if/then/else statement. Three expressions are grouped as (condition) ? (if-true) : (if-false).If the first expression is true, the second condition will be evaluated;if it is false,the third will be evaluated instead.&lt;br /&gt;Q.9 What is ZEND?&lt;br /&gt;Ans. ZEND is a PHP language engine, named for its co-creators Zeev Suraski and Andi Gutmans,which handles the compilation and execution of PHP scripts as well as management of the PHP API.&lt;br /&gt;Q.10 What is Polymorphism?&lt;br /&gt;Ans. Polymorphism is a property of object inheritance that enables methods of the same name to performdifferent actions through successive generations of a class definition.&lt;br /&gt;Q.11 What do you understand by aggregate functions?&lt;br /&gt;Ans. Aggregate functions are special SQL functions that take the values from multiple rows of data to produce a single result per grouping. Examples of aggregate functions include MIN(), MAX(), COUNT(), SUM(), and AVG().&lt;br /&gt;Q.12 What do you understand by clone?&lt;br /&gt;Ans. Clone creates a copy of an object. In most cases, this simply means copying property values from the original object to the new object; however, cloning may require performing alteration or seperation logic so that the new object does not create a resource conflict. In PHP 4, objects are cloned by default. In PHP 5, objects are implicitly referenced and only cloned by explicit request.&lt;br /&gt;Q.13 What does @ operator do?&lt;br /&gt;Ans. @ is an error control operator which prevents the error from being printed out(but not from     occurring):&lt;br /&gt;&lt;?php    @$a = 1 / 0;?&gt;    Q.14 What is the use of "variable variables"?  &lt;br /&gt;Ans. It allows to use the value of a variable as the name of a variable. For example:&lt;?php    $a = 100;    $b = 'a';    echo $$b;?&gt;    When this script is executed and the interpreter encounters the $$b expression,it first determines thevalue of $b,which is the string a. It then reevaluates the expression with a substituted for $b as $a,thus returning the value of the $a variable.         Q.15 What is the use of "variable functions"?  &lt;br /&gt;Ans. It allows to use the value of a variable as the name of a function. For example:&lt;br /&gt;&lt;?php    function odd_number ($x)    {        echo "$x is odd";    }&lt;br /&gt;    function even_number ($x)    {        echo "$x is even";    }&lt;br /&gt;    $n = 13;    $a = ($n % 2 ? 'odd_number' : 'even_number');    $a($n);?&gt;    At the end of the script,$a will contain either odd_number or even_number. The expression $a($n) will then be evaluated as a call to either odd_number() or even_number().&lt;br /&gt;Q.16 Describe the operation of a cookie ?&lt;br /&gt;Ans.  The operation of a cookie is described by the following series of events: 1. Client sends an HTTP request to server. 2. Server sends an HTTP response with Set-Cookie: foo=bar to client. 3. Client sends an HTTP request with Cookie: foo=bar to server. 4. Server sends an HTTP response to client.&lt;br /&gt;Q.17 Explain the use of var_dump ($array)?&lt;br /&gt;Ans. Dumps information about a variable. e.g.&lt;br /&gt;&lt;?php $array[1] = 1; var_dump ($array);?&gt;&lt;br /&gt;Output:array(1) {    [1]=&gt;    int(1)}&lt;br /&gt;Q.18 What do you understand by radomizing arrays?&lt;br /&gt;Ans. This means to extract a random value from an array. This can be accomplished by using the array_rand() function, which returns the index of one or more elements picked at random:&lt;br /&gt;&lt;?php    $array = array('Gibs','Bhavs','Nains','Garry','Aksh');    echo array_rand($array,1);?&gt;&lt;br /&gt;In this case as we specified only one element should be returned; therefore we'll receive a single value. (It was 2 in my case, corresponding to the "Nains" element.) If we specified more than one element, the result would be returned as an array of keys.&lt;br /&gt;Q.19 What is the difference between '==' and '===' operators?&lt;br /&gt;Ans. '==' operator tests the equivalence of two entities whereas '===' operator also tests data type.&lt;br /&gt;Q.20 Describe regular expressions and their types?&lt;br /&gt;Ans. Regular expressions(regexps) are the most powerful tools in the string manipulation toolbox.They provide a robust language for specifying patterns in strings and extracting or replacing identified portions of text.                                                                                                      Regular expressions in PHP are of two types: PCRE and POSIX. PCRE Regular expressions are so named because they use the Perl Compatible Regular Expression library to provide regexps with the same syntax and semantics as those in Perl. POSIX regular expressions support standard POSIX-extended regular expression syntax.    Q.21 What is the Basic PCRE Syntax?   &lt;br /&gt;Ans. A regular expression pattern is a string consisting of plain text and pattern metacharacters.The regexps metacharacters define the type and number of characters that can match a particular part of a pattern.The most basic set of metacharacters are the character classes, which allow a pattern to match multiple characters simultaneously.The basic character classes are shown in table:    PCRE Base Character Classes&lt;br /&gt; Metacharacter  Characters Matched         \d  Digits 0-9         \D  Anything not a digit         \w  Any alphanumeric character or an underscore (_)         \W  Anything not an alphanumeric character or an underscore          \s  Any whitespace (spaces,tabs,newlines)         \S  Any nonwhitespace character           .  Any character except for a newline             The basic character class metacharacters each match a single character. Thus, to make them useful in patterns, it can be specified how many times they must match with the help of PCRE Enumerators.&lt;br /&gt;Q.22 How PHP handles dates and times?&lt;br /&gt;Ans.  PHP handles dates and times in three basic formats:1. UNIX time stamps2. Date arrays3. String- formatted dates Internally PHP stores all its dates as UNIX time stamps, which are defined as the number of seconds since the UNIX epoch, January 1, 1970 00:00:00 UTC.&lt;br /&gt;Q.23 For how long are the PHP date functions guaranteed to work on 32-bit systems?&lt;br /&gt;Ans. On 32-bit systems, the PHP date functions are only guaranteed to work until January 19, 2038.&lt;br /&gt;Q.24 Name the function which will return the current UNIX time stamp?&lt;br /&gt;Ans. time().&lt;br /&gt;Q.25 Write any two functions which will output the current time as 11:26 pm?&lt;br /&gt;Ans. print date('g:i a'); and  print strftime('%I:%M %p');&lt;br /&gt;Q.26 What is Mail Transport Agent?&lt;br /&gt;Ans. When email is sent from organization to organization, it is sent from email server to email server. The software that runs on our email server and handles sending and receiving email from around the Internet is called the Mail Transport Agent(MTA). Examples of MTA are:- sendmail- postfix- qmail- Microsoft Exchange- Lotus NotesMail transport agents talk to each other using the SMTP network protocol.&lt;br /&gt;Q.27 What is Simple Mail Transport Protocol?&lt;br /&gt;Ans. The Simple Mail Transport Protocol(SMTP) is the standard network-layer protocol for transmitting an email message across the Internet. Servers normally listen for incoming SMTP connections on port 25.&lt;br /&gt;Q.28 What do you understand by MX Records?&lt;br /&gt;Ans. When an MTA has an email message to send to another MTA, it has to convert the address in the To:, Cc:, or  Bcc: line into an IP address. Everything after the @ sign in the address is taken to be the email domain. The email domain is not the real name of a server, it's actually a special kind of DNS alias. To receive email for our email domain we have to add an MX record for that email domain to our DNS server.&lt;br /&gt;Q.29 What is Mail User Agent?    Ans. The Mail User Agent(MUA) is the jargon name for an email client.Examples of Mail User Agents are:- Outlook Express- Evolution - KMail- pine- mutt- HotmailA PHP scripts that sends email is also a type of Mail User Agent.&lt;br /&gt;Mail User Agents read email directly from files on disk, via network protocols such as POP3 or IMAP, or via proprietary network protocols(as used by Microsoft Exchange). Mail User Agents normally send their email by connecting to a Mail Transport Agent over the network via the SMTP network protocol.Some UNIX-based Mail User Agents may send their email instead by executing a sendmail wrapper program.When a Mail User Agent connects to an MTA via SMTP to send email, it may use SASL to authenticate the user.&lt;br /&gt;Q.30 What is SASL?&lt;br /&gt;Ans. The Simple Authentication and Security Layer(SASL) is a tried and trusted way to bolt user-Authentication onto existing network protocols. SMTP has been extended (via the SMTP AUTH command) to support SASL.&lt;br /&gt;Q.31 How would you attach a file to an email message?&lt;br /&gt;Ans. To attach a file to an email message, we have to create a multipart MIME message.     -Pass these headers as the fourth parameter to mail():     MIME-Version: 1.0     Content-Type: multipart/mixed; boundary="php-12345" Note the boundary on the end of the Content-Type.The boundary is an arbitrary US-ASCII string that tells MUAs when the end of a MIME block has been reached.    -The first part of the message string should be a plain text message.Note the boundary marker after the message which tells MIME that we've reached the end of this particular part of the email message.     -The second part of the "message string " should be the message itself.We need to add Content-Type and Content-Transfer-Encoding headers to the message, followed by the message itself. We have to put the boundary marker after at the end of each part of the message.     -Next come the attachments. Each attachment gets added to the "message" string as well. We need to add Content-Type and Content-Transfer-Encoding headers, and then the attachment.    Q.32 How would you attach images for HTML emails?   Ans. HTML emails will attampt to download their images and stylesheets from our web server. Because of security and privacy reason, many MUAs will refuse to attempt these downloads.We can add images as attachments to the email, and then point HTML at the attached images.- Change the first Content type of email to be multipart/related.Boundary definition must be included.- When we add an image as an attachment, include this additional header:  Content-Location: URL URL is the "URL" that we use inside the &lt;img&gt;tag to include the image. Q.33 How do you open a socket?&lt;br /&gt;Ans. We can create a socket using the fsockopen() and pfsockopen() functions.We tell PHP what type of network transport we want to use by prefixing the transport to the name or IP address of the server we want to connect to. Sockets created using fsockopen() are automatically closed by PHP when our script ends while sockets created using pfsockopen() are persistent.&lt;br /&gt;Q.34 What is SQL Injection?&lt;br /&gt;Ans. It is a form of exploit attack, similar to Command Injection, used against scripts that do not adequately validate or filter user supplied data. When unfiltered and unvalidated data is passed to a SQL query, it can potentially allow a malicious user to execute arbitrary SQL commands enabling him to steal and/or destroy important information.&lt;br /&gt;Q.35 What is the use of database indexing?&lt;br /&gt;Ans. A database index enables our RDBMS to more quickly find data based on identifying fields. For example, if we plan to allow searching by name, creating an index on the name field in our database will yield faster lookup results.&lt;br /&gt;Q.36 What is the use of Debuggers?&lt;br /&gt;Ans. Debugger applications and extensions allow a developer to track the runtime execution of a script highlighting variable values and logic flow. Examples of debugging tools include DBG, APD, and XDebug.&lt;br /&gt;Q.37 Why error logging is required for a site?&lt;br /&gt;Ans. Error logging (usually to a file) allows us as the site maintainer to keep a track on error conditions in our script. At the same time, this hides errors from our users who at best will not know what to do with the messages, or at worst will use those errors to compromise our site.&lt;br /&gt;Q.38 What is MIME Encoding?&lt;br /&gt;Ans. MIME(Multipart Internet Message Extensions) Encoding is originally defined by RFC 1341, it extends basic email encapsulation(which is limited to a single text body section) to allow for an arbitrary number of attachments - each of which may use a distinct content type and encoding.&lt;br /&gt;Q.39 What is Open Basedir?&lt;br /&gt;Ans.The php.ini setting open_basedir is a technique used on many Shared Hosting providers(along with safe_mode) to limit the ability of one user to read another user's files. When This setting is used, any running script is restricted from using fopen() or other filesystem access functions on files that resides outside the directory specified.&lt;br /&gt;Q.40 What is the use of Output buffering?&lt;br /&gt;Ans. Output buffering, controlled by settings in our php.ini or use of the ob_ start () function, causes generated output to be temporary stored in memory. While generally streamlining the output pipeline, this process also enables an executing script to cancel, modify, or inject content even after"output" has already started. This also means that the header() command can be used after contant has been output(normally not allowed).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6027565613860287103-808527341860974352?l=phpgreat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpgreat.blogspot.com/feeds/808527341860974352/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6027565613860287103&amp;postID=808527341860974352' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6027565613860287103/posts/default/808527341860974352'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6027565613860287103/posts/default/808527341860974352'/><link rel='alternate' type='text/html' href='http://phpgreat.blogspot.com/2008/08/php-interview-questions-latest.html' title='PHP INTERVIEW QUESTIONS LATEST'/><author><name>web Scientist</name><uri>http://www.blogger.com/profile/15599908111812889832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6027565613860287103.post-2003946830840175219</id><published>2008-04-20T01:00:00.000-07:00</published><updated>2008-04-20T03:24:57.988-07:00</updated><title type='text'>PHP Mysql  Best server side technology</title><content type='html'>&lt;a href="http://phpgreat.blogspot.com" target="_blank"&gt;PHP FAQ&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;  &lt;a href="http://mysqltricks.blogspot.com" target="_blank"&gt;MYSQL Tricks&amp;nbsp;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;  &lt;a href="http://phpmysqlgreat.blogspot.com" target="_blank"&gt;PHP MYSQL INTERVIEW&amp;nbsp;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;  &lt;a href="http://phpgreat.blogspot.com" target="_blank"&gt;PHP TIPS &amp;amp; Tricks &lt;br /&gt;  &lt;/a&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:180%;color:#ff6600;"&gt;PHP Interview Questions, Answers [Php FAQ ]&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#6633ff;"&gt;What's PHP ?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="color:#6600cc;"&gt;The PHP Hypertext Preprocessor is a programming language that allows web developers&lt;/span&gt;&lt;br /&gt;to create dynamic content that interacts with databases. PHP is basically used&lt;br /&gt;for developing web based software applications.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#6633ff;"&gt;&lt;strong&gt;What Is a Session? &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A session is a logical object created by the PHP engine to allow you to preserve&lt;br /&gt;data across subsequent HTTP requests.&lt;br /&gt;&lt;p&gt;There is only one session object available to your PHP scripts at any time.&lt;br /&gt;Data saved to the session by a script can be retrieved by the same script or&lt;br /&gt;another script when requested from the same visitor.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="color:#ff6600;"&gt;Sessions are commonly used to store temporary data to allow multiple PHP pages to offer a complete functional transaction for the same visitor.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#6633cc;"&gt;&lt;strong&gt;What is meant by PEAR in php? &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;Answer1:&lt;br /&gt;PEAR is the next revolution in PHP. This repository is bringing higher level&lt;br /&gt;programming to PHP. PEAR is a framework and distribution system for reusable&lt;br /&gt;PHP components. It eases installation by bringing an automated wizard, and packing&lt;br /&gt;the strength and experience of PHP users into a nicely organised OOP library.&lt;br /&gt;PEAR also provides a command-line interface that can be used to automatically&lt;br /&gt;install "packages"&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#6699ff;"&gt;Answer2:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;PEAR is short for "PHP Extension and Application Repository" and is&lt;br /&gt;pronounced just like the fruit. The purpose of PEAR is to provide:&lt;br /&gt;&lt;br /&gt;A structured library of open-sourced code for PHP users&lt;br /&gt;&lt;br /&gt;A system for code distribution and package maintenance&lt;br /&gt;&lt;br /&gt;A standard style for code written in PHP&lt;br /&gt;&lt;br /&gt;The PHP Foundation Classes (PFC),&lt;br /&gt;&lt;br /&gt;The PHP Extension Community Library (PECL),&lt;br /&gt;&lt;br /&gt;A web site, mailing lists and download mirrors to support the PHP/PEAR community&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;PEAR is a community-driven project with the PEAR Group as the governing body.&lt;br /&gt;The project has been founded by Stig S. Bakken in 1999 and quite a lot of people&lt;br /&gt;have joined the project since then.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#cc0000;"&gt;How can we know the number of days between two given dates using PHP?&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Simple arithmetic:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;$date1 = date('Y-m-d');&lt;br /&gt;&lt;br /&gt;$date2 = '2006-07-01';&lt;br /&gt;&lt;br /&gt;$days = (strtotime() - strtotime()) / (60 * 60 * 24);&lt;br /&gt;&lt;br /&gt;echo "Number of days since '2006-07-01': $days";&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#6633cc;"&gt;&lt;strong&gt;How can we repair a MySQL table? &lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The syntex for repairing a mysql table is:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;REPAIR TABLE tablename&lt;br /&gt;&lt;br /&gt;REPAIR TABLE tablename QUICK&lt;br /&gt;&lt;br /&gt;REPAIR TABLE tablename EXTENDED&lt;/p&gt;&lt;br /&gt;&lt;p&gt;This command will repair the table specified.&lt;br /&gt;&lt;br /&gt;If QUICK is given, MySQL will do a repair of only the index tree.&lt;br /&gt;&lt;br /&gt;If EXTENDED is given, it will create index row by row.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#6633ff;"&gt;&lt;strong&gt;What is the difference between $message and $$message?&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Anwser 1:&lt;br /&gt;&lt;br /&gt;$message is a simple variable whereas $$message is a reference variable. Example:&lt;br /&gt;&lt;br /&gt;$user = 'bob'&lt;/p&gt;&lt;br /&gt;&lt;p&gt;is equivalent to&lt;/p&gt;&lt;br /&gt;&lt;p&gt;$holder = 'user';&lt;br /&gt;&lt;br /&gt;$$holder = 'bob';&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;Anwser 2:&lt;br /&gt;&lt;br /&gt;They are both variables. But $message is a variable with a fixed name. $$message&lt;br /&gt;is a variable who's name is stored in $message. For example, if $message contains&lt;br /&gt;"var", $$message is the same as $var.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#993366;"&gt;&lt;strong&gt;What Is a Persistent Cookie? &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A persistent cookie is a cookie which is stored in a cookie file permanently&lt;br /&gt;on the browser's computer. By default, cookies are created as temporary cookies&lt;br /&gt;which stored only in the browser's memory. When the browser is closed, temporary&lt;br /&gt;cookies will be erased. You should decide when to use temporary cookies and&lt;br /&gt;when to use persistent cookies based on their differences:&lt;br /&gt;&lt;br /&gt;*Temporary cookies can not be used for tracking long-term information.&lt;br /&gt;&lt;br /&gt;*Persistent cookies can be used for tracking long-term information.&lt;br /&gt;&lt;br /&gt;*Temporary cookies are safer because no programs other than the browser can&lt;br /&gt;access them.&lt;br /&gt;&lt;br /&gt;*Persistent cookies are less secure because users can open cookie files see&lt;br /&gt;the cookie values.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#6633ff;"&gt;&lt;strong&gt;What does a special set of tags &amp;lt;?= and ?&amp;gt;&lt;br /&gt;do in PHP? &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The output is displayed directly to the browser.  &lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="color:#6633ff;"&gt;How do you define a constant?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Via define() directive, like define ("MYCONSTANT", 100);&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#6633ff;"&gt;&lt;strong&gt;What are the differences between require and include,&lt;br /&gt;include_once? &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Anwser 1:&lt;br /&gt;&lt;br /&gt;require_once() and include_once() are both the functions to include and evaluate&lt;br /&gt;the specified file only once. If the specified file is included previous to&lt;br /&gt;the present call occurrence, it will not be done again.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;But require() and include() will do it as many times they are asked to do.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Anwser 2:&lt;br /&gt;&lt;br /&gt;The include_once() statement includes and evaluates the specified file during&lt;br /&gt;the execution of the script. This is a behavior similar to the include() statement,&lt;br /&gt;with the only difference being that if the code from a file has already been&lt;br /&gt;included, it will not be included again. The major difference between include()&lt;br /&gt;and require() is that in failure include() produces a warning message whereas&lt;br /&gt;require() produces a fatal errors. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Anwser 3:&lt;br /&gt;&lt;br /&gt;All three are used to an include file into the current page.&lt;br /&gt;&lt;br /&gt;If the file is not present, require(), calls a fatal error, while in include()&lt;br /&gt;does not.&lt;br /&gt;&lt;br /&gt;The include_once() statement includes and evaluates the specified file during&lt;br /&gt;the execution of the script. This is a behavior similar to the include() statement,&lt;br /&gt;with the only difference being that if the code from a file has already been&lt;br /&gt;included, it will not be included again. It des not call a fatal error if file&lt;br /&gt;not exists. require_once() does the same as include_once(), but it calls a fatal&lt;br /&gt;error if file not exists. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Anwser 4:&lt;br /&gt;&lt;br /&gt;File will not be included more than once. If we want to include a file once&lt;br /&gt;only and further calling of the file will be ignored then we have to use the&lt;br /&gt;PHP function include_once(). This will prevent problems with function redefinitions,&lt;br /&gt;variable value reassignments, etc.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#6633ff;"&gt;&lt;strong&gt;What is meant by urlencode and urldecode?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Anwser 1:&lt;br /&gt;&lt;br /&gt;urlencode() returns the URL encoded version of the given string. URL coding&lt;br /&gt;converts special characters into % signs followed by two hex digits. For example:&lt;br /&gt;urlencode("10.00%") will return "10%2E00%25". URL encoded&lt;br /&gt;strings are safe to be used as part of URLs.&lt;br /&gt;&lt;br /&gt;urldecode() returns the URL decoded version of the given string.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Anwser 2:&lt;br /&gt;&lt;br /&gt;string urlencode(str) - Returns the URL encoded version of the input string.&lt;br /&gt;String values to be used in URL query string need to be URL encoded. In the&lt;br /&gt;URL encoded version:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Alphanumeric characters are maintained as is.&lt;br /&gt;&lt;br /&gt;Space characters are converted to "+" characters.&lt;br /&gt;&lt;br /&gt;Other non-alphanumeric characters are converted "%" followed by two&lt;br /&gt;hex digits representing the converted character.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;string urldecode(str) - Returns the original string of the input URL encoded&lt;br /&gt;string.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;For example:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;$discount ="10.00%";&lt;br /&gt;&lt;br /&gt;$url = "http://domain.com/submit.php?disc=".urlencode($discount);&lt;br /&gt;&lt;br /&gt;echo $url;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;You will get "http://domain.com/submit.php?disc=10%2E00%25".&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff3300;"&gt;&lt;strong&gt;How To Get the Uploaded File Information in the&lt;br /&gt;Receiving Script? &lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Once the Web server received the uploaded file, it will call the PHP script&lt;br /&gt;specified in the form action attribute to process them. This receiving PHP script&lt;br /&gt;can get the uploaded file information through the predefined array called $_FILES.&lt;br /&gt;Uploaded file information is organized in $_FILES as a two-dimensional array&lt;br /&gt;as:&lt;br /&gt;&lt;br /&gt;$_FILES[$fieldName]['name'] - The Original file name on the browser system.&lt;br /&gt;&lt;br /&gt;$_FILES[$fieldName]['type'] - The file type determined by the browser.&lt;br /&gt;&lt;br /&gt;$_FILES[$fieldName]['size'] - The Number of bytes of the file content.&lt;br /&gt;&lt;br /&gt;$_FILES[$fieldName]['tmp_name'] - The temporary filename of the file in which&lt;br /&gt;the uploaded file was stored on the server.&lt;br /&gt;&lt;br /&gt;$_FILES[$fieldName]['error'] - The error code associated with this file upload.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The $fieldName is the name used in the &amp;lt;INPUT TYPE=FILE, NAME=fieldName&amp;gt;.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#ff6600;"&gt;What is the difference between mysql_fetch_object&lt;br /&gt;and mysql_fetch_array? &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;MySQL fetch object will collect first single matching record where mysql_fetch_array&lt;br /&gt;will collect all matching records from the table in an array&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;&lt;strong&gt;How can I execute a PHP script using command line?&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Just run the PHP CLI (Command Line Interface) program and provide the PHP script&lt;br /&gt;file name as the command line argument. For example, "php myScript.php",&lt;br /&gt;assuming "php" is the command to invoke the CLI program.&lt;br /&gt;&lt;br /&gt;Be aware that if your PHP script was written for the Web CGI interface, it may&lt;br /&gt;not execute properly in command line environment.&lt;br /&gt;&lt;br /&gt;I am trying to assign a variable the value of 0123, but it keeps coming up with&lt;br /&gt;a different number, what’s the problem?&lt;br /&gt;&lt;br /&gt;PHP Interpreter treats numbers beginning with 0 as octal. Look at the similar&lt;br /&gt;PHP interview questions for more numeric problems.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="color:#0000ff;"&gt;&lt;strong&gt;Would I use print "$a dollars" or "{$a}&lt;br /&gt;dollars" to print out the amount of dollars in this example?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In this example it wouldn’t matter, since the variable is all by itself,&lt;br /&gt;but if you were to print something like "{$a},000,000 mln dollars",&lt;br /&gt;then you definitely need to use the braces.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#6633ff;"&gt;What are the different tables present in MySQL?&lt;br /&gt;Which type of table is generated when we are creating a table in the following&lt;br /&gt;syntax: create table employee(eno int(2),ename varchar(10))? &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Total 5 types of tables we can create&lt;br /&gt;&lt;br /&gt;1. MyISAM&lt;br /&gt;&lt;br /&gt;2. Heap&lt;br /&gt;&lt;br /&gt;3. Merge&lt;br /&gt;&lt;br /&gt;4. INNO DB&lt;br /&gt;&lt;br /&gt;5. ISAM&lt;br /&gt;&lt;br /&gt;MyISAM is the default storage engine as of MySQL 3.23. When you fire the above&lt;br /&gt;create query MySQL will create a MyISAM table.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#ff6600;"&gt;How To Create a Table? &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;If you want to create a table, you can run the CREATE TABLE statement as shown&lt;br /&gt;in the following sample script: &lt;/p&gt;&lt;br /&gt;&lt;p&gt;&amp;lt;?php&lt;br /&gt;&lt;br /&gt;include "mysql_connection.php";&lt;/p&gt;&lt;br /&gt;&lt;p&gt;$sql = "CREATE TABLE Tech_links ("&lt;br /&gt;&lt;br /&gt;. " id INTEGER NOT NULL"&lt;br /&gt;&lt;br /&gt;. ", url VARCHAR(80) NOT NULL"&lt;br /&gt;&lt;br /&gt;. ", notes VARCHAR(1024)"&lt;br /&gt;&lt;br /&gt;. ", counts INTEGER"&lt;br /&gt;&lt;br /&gt;. ", time TIMESTAMP DEFAULT sysdate()"&lt;br /&gt;&lt;br /&gt;. ")";&lt;br /&gt;&lt;br /&gt;if (mysql_query($sql, $con)) {&lt;br /&gt;&lt;br /&gt;print("Table Tech_links created.\n");&lt;br /&gt;&lt;br /&gt;} else {&lt;br /&gt;&lt;br /&gt;print("Table creation failed.\n");&lt;br /&gt;&lt;br /&gt;}&lt;/p&gt;&lt;br /&gt;&lt;p&gt;mysql_close($con);&lt;br /&gt;&lt;br /&gt;?&amp;gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Remember that mysql_query() returns TRUE/FALSE on CREATE statements. If you&lt;br /&gt;run this script, you will get something like this:&lt;br /&gt;&lt;br /&gt;Table Tech_links created.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#99cc00;"&gt;&lt;strong&gt;How can we encrypt the username and password using&lt;br /&gt;PHP? &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Answer1&lt;br /&gt;&lt;br /&gt;You can encrypt a password with the following Mysql&amp;gt;SET PASSWORD=PASSWORD("Password");&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer2&lt;br /&gt;&lt;br /&gt;You can use the MySQL PASSWORD() function to encrypt username and password.&lt;br /&gt;For example,&lt;br /&gt;&lt;br /&gt;INSERT into user (password, ...) VALUES (PASSWORD($password”)), ...);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;How do you pass a variable by value?&lt;br /&gt;&lt;br /&gt;Just like in C++, put an ampersand in front of it, like $a = &amp;amp;$b&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;strong&gt;What is the functionality of the functions STRSTR()&lt;br /&gt;and STRISTR()? &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;string strstr ( string haystack, string needle ) returns part of haystack string&lt;br /&gt;from the first occurrence of needle to the end of haystack. This function is&lt;br /&gt;case-sensitive. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;stristr() is idential to strstr() except that it is case insensitive.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;&lt;strong&gt;When are you supposed to use endif to end the&lt;br /&gt;conditional statement? &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When the original if was followed by : and then the code block without braces.&lt;br /&gt;&lt;br /&gt;How can we send mail using JavaScript?&lt;br /&gt;&lt;br /&gt;No. There is no way to send emails directly using JavaScript. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;But you can use JavaScript to execute a client side email program send the&lt;br /&gt;email using the "mailto" code. Here is an example: &lt;/p&gt;&lt;br /&gt;&lt;p&gt;function myfunction(form)&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;tdata=document.myform.tbox1.value;&lt;br /&gt;&lt;br /&gt;location="mailto:mailid@domain.com?subject=...";&lt;br /&gt;&lt;br /&gt;return true;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#993333;"&gt;&lt;strong&gt;What is the functionality of the function strstr&lt;br /&gt;and stristr? &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;strstr() returns part of a given string from the first occurrence of a given&lt;br /&gt;substring to the end of the string. For example: strstr("user@example.com","@")&lt;br /&gt;will return "@example.com".&lt;br /&gt;&lt;br /&gt;stristr() is idential to strstr() except that it is case insensitive.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="color:#ff6600;"&gt;What is the difference between ereg_replace()&lt;br /&gt;and eregi_replace()?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;eregi_replace() function is identical to ereg_replace() except that it ignores&lt;br /&gt;case distinction when matching alphabetic characters.&lt;br /&gt;&lt;br /&gt;How do I find out the number of parameters passed into function9. ?&lt;br /&gt;&lt;br /&gt;func_num_args() function returns the number of parameters passed in.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff6600;"&gt;&lt;strong&gt;What is the purpose of the following files having&lt;br /&gt;extensions: frm, myd, and myi? What these files contain? &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In MySQL, the default table type is MyISAM.&lt;br /&gt;&lt;br /&gt;Each MyISAM table is stored on disk in three files. The files have names that&lt;br /&gt;begin with the table name and have an extension to indicate the file type.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The '.frm' file stores the table definition.&lt;br /&gt;&lt;br /&gt;The data file has a '.MYD' (MYData) extension.&lt;br /&gt;&lt;br /&gt;The index file has a '.MYI' (MYIndex) extension,&lt;br /&gt;&lt;br /&gt;If the variable $a is equal to 5 and variable $b is equal to character a, what’s&lt;br /&gt;the value of $$b?&lt;br /&gt;&lt;br /&gt;100, it’s a reference to existing variable.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#9933cc;"&gt;&lt;strong&gt;How To Protect Special Characters in Query String?&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you want to include special characters like spaces in the query string, you&lt;br /&gt;need to protect them by applying the urlencode() translation function. The script&lt;br /&gt;below shows how to use urlencode():&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&amp;lt;?php&lt;br /&gt;&lt;br /&gt;print("&amp;lt;html&amp;gt;");&lt;br /&gt;&lt;br /&gt;print("&amp;lt;p&amp;gt;Please click the links below"&lt;br /&gt;&lt;br /&gt;." to submit comments about TECHPreparation.com:&amp;lt;/p&amp;gt;");&lt;br /&gt;&lt;br /&gt;$comment = 'I want to say: "It\'s a good site! :-&amp;gt;"';&lt;br /&gt;&lt;br /&gt;$comment = urlencode($comment);&lt;br /&gt;&lt;br /&gt;print("&amp;lt;p&amp;gt;"&lt;br /&gt;&lt;br /&gt;."&amp;lt;a href=\"processing_forms.php?name=Guest&amp;amp;comment=$comment\"&amp;gt;"&lt;br /&gt;&lt;br /&gt;."It's an excellent site!&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;");&lt;br /&gt;&lt;br /&gt;$comment = 'This visitor said: "It\'s an average site! :-("';&lt;br /&gt;&lt;br /&gt;$comment = urlencode($comment);&lt;br /&gt;&lt;br /&gt;print("&amp;lt;p&amp;gt;"&lt;br /&gt;&lt;br /&gt;.'&amp;lt;a href="processing_forms.php?'.$comment.'"&amp;gt;'&lt;br /&gt;&lt;br /&gt;."It's an average site.&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;");&lt;br /&gt;&lt;br /&gt;print("&amp;lt;/html&amp;gt;");&lt;br /&gt;&lt;br /&gt;?&amp;gt;&lt;br /&gt;&lt;br /&gt;Are objects passed by value or by reference?&lt;br /&gt;&lt;br /&gt;Everything is passed by value.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff6600;"&gt;&lt;strong&gt;What are the differences between DROP a table&lt;br /&gt;and TRUNCATE a table? &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;DROP TABLE table_name - This will delete the table and its data.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;TRUNCATE TABLE table_name - This will delete the data of the table, but not&lt;br /&gt;the table definition.&lt;br /&gt;&lt;br /&gt;How do you call a constructor for a parent class?&lt;br /&gt;&lt;br /&gt;parent::constructor($value)&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#996666;"&gt;&lt;strong&gt;WHAT ARE THE DIFFERENT TYPES OF ERRORS IN PHP?&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Here are three basic types of runtime errors in PHP:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;1. Notices: These are trivial, non-critical errors that PHP encounters while&lt;br /&gt;executing a script - for example, accessing a variable that has not yet been&lt;br /&gt;defined. By default, such errors are not displayed to the user at all - although&lt;br /&gt;you can change this default behavior. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;2. Warnings: These are more serious errors - for example, attempting to include()&lt;br /&gt;a file which does not exist. By default, these errors are displayed to the user,&lt;br /&gt;but they do not result in script termination. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;3. Fatal errors: These are critical errors - for example, instantiating an&lt;br /&gt;object of a non-existent class, or calling a non-existent function. These errors&lt;br /&gt;cause the immediate termination of the script, and PHP's default behavior is&lt;br /&gt;to display them to the user when they take place. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Internally, these variations are represented by twelve different error types&lt;br /&gt;&lt;br /&gt;What’s the special meaning of __sleep and __wakeup?&lt;br /&gt;&lt;br /&gt;__sleep returns the array of all the variables than need to be saved, while&lt;br /&gt;__wakeup retrieves them.&lt;br /&gt;&lt;br /&gt;How can we submit a form without a submit button?&lt;br /&gt;&lt;br /&gt;If you don't want to use the Submit button to submit a form, you can use normal&lt;br /&gt;hyper links to submit a form. But you need to use some JavaScript code in the&lt;br /&gt;URL of the link. For example: &lt;/p&gt;&lt;br /&gt;&lt;p&gt;&amp;lt;a href="javascript: document.myform.submit();"&amp;gt;Submit Me&amp;lt;/a&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;How can we register the variables into a session?&lt;br /&gt;&lt;br /&gt;session_register($session_var); &lt;/p&gt;&lt;br /&gt;&lt;p&gt;$_SESSION['var'] = 'value';&lt;br /&gt;&lt;br /&gt;What is the difference between characters \023 and \x23?&lt;br /&gt;&lt;br /&gt;The first one is octal 23, the second is hex 23.&lt;br /&gt;&lt;br /&gt;With a heredoc syntax, do I get variable substitution inside the heredoc contents?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Yes.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#663399;"&gt;&lt;strong&gt;How can we submit form without a submit button?&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We can use a simple JavaScript code linked to an event trigger of any form field.&lt;br /&gt;In the JavaScript code, we can call the document.form.submit() function to submit&lt;br /&gt;the form. For example: &amp;lt;input type=button value="Save" onClick="document.form.submit()"&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;How can we create a database using PHP and mysql?&lt;br /&gt;&lt;br /&gt;We can create MySQL database with the use of mysql_create_db($databaseName)&lt;br /&gt;to create a database.&lt;br /&gt;&lt;br /&gt;How many ways we can retrieve the date in result set of mysql using php?&lt;br /&gt;&lt;br /&gt;As individual objects so single record or as a set or arrays.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#ff6600;"&gt;Can we use include ("abc.php") two times&lt;br /&gt;in a php page "makeit.php"? &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Yes.&lt;br /&gt;&lt;br /&gt;For printing out strings, there are echo, print and printf. Explain the differences.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;echo is the most primitive of them, and just outputs the contents following&lt;br /&gt;the construct to the screen. print is also a construct (so parentheses are optional&lt;br /&gt;when calling it), but it returns TRUE on successful output and FALSE if it was&lt;br /&gt;unable to print out the string. However, you can pass multiple parameters to&lt;br /&gt;echo, like: &lt;/p&gt;&lt;br /&gt;&lt;p&gt;&amp;lt;?php echo 'Welcome ', 'to', ' ', 'techpreparations!'; ?&amp;gt; &lt;/p&gt;&lt;br /&gt;&lt;p&gt;and it will output the string "Welcome to techpreparations!" print&lt;br /&gt;does not take multiple parameters. It is also generally argued that echo is&lt;br /&gt;faster, but usually the speed advantage is negligible, and might not be there&lt;br /&gt;for future versions of PHP. printf is a function, not a construct, and allows&lt;br /&gt;such advantages as formatted output, but it’s the slowest way to print&lt;br /&gt;out data out of echo, print and printf.&lt;br /&gt;&lt;br /&gt;I am writing an application in PHP that outputs a printable version of driving&lt;br /&gt;directions. It contains some long sentences, and I am a neat freak, and would&lt;br /&gt;like to make sure that no line exceeds 50 characters. How do I accomplish that&lt;br /&gt;with PHP?&lt;br /&gt;&lt;br /&gt;On large strings that need to be formatted according to some length specifications,&lt;br /&gt;use wordwrap() or chunk_split().&lt;br /&gt;&lt;br /&gt;What’s the output of the ucwords function in this example?&lt;br /&gt;&lt;br /&gt;$formatted = ucwords("TECHPREPARATIONS IS COLLECTION OF INTERVIEW QUESTIONS");&lt;br /&gt;&lt;br /&gt;print $formatted;&lt;br /&gt;&lt;br /&gt;What will be printed is TECHPREPARATIONS IS COLLECTION OF INTERVIEW QUESTIONS.&lt;br /&gt;&lt;br /&gt;ucwords() makes every first letter of every word capital, but it does not lower-case&lt;br /&gt;anything else. To avoid this, and get a properly formatted string, it’s&lt;br /&gt;worth using strtolower() first.&lt;br /&gt;&lt;br /&gt;What’s the difference between htmlentities() and htmlspecialchars()?&lt;br /&gt;&lt;br /&gt;htmlspecialchars only takes care of &amp;lt;, &amp;gt;, single quote ‘, double&lt;br /&gt;quote " and ampersand. htmlentities translates all occurrences of character&lt;br /&gt;sequences that have different meaning in HTML.&lt;br /&gt;&lt;br /&gt;How can we extract string "abc.com" from a string "mailto:info@abc.com?subject=Feedback"&lt;br /&gt;using regular expression of PHP?&lt;br /&gt;&lt;br /&gt;$text = "mailto:info@abc.com?subject=Feedback";&lt;br /&gt;&lt;br /&gt;preg_match('.*@([^?]*)', $text, $output);&lt;br /&gt;&lt;br /&gt;echo $output[1];&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Note that the second index of $output, $output[1], gives the match, not the&lt;br /&gt;first one, $output[0].&lt;br /&gt;&lt;br /&gt;So if md5() generates the most secure hash, why would you ever use the less&lt;br /&gt;secure crc32() and sha1()?&lt;br /&gt;&lt;br /&gt;Crypto usage in PHP is simple, but that doesn’t mean it’s free.&lt;br /&gt;First off, depending on the data that you’re encrypting, you might have&lt;br /&gt;reasons to store a 32-bit value in the database instead of the 160-bit value&lt;br /&gt;to save on space. Second, the more secure the crypto is, the longer is the computation&lt;br /&gt;time to deliver the hash value. A high volume site might be significantly slowed&lt;br /&gt;down, if frequent md5() generation is required.&lt;br /&gt;&lt;br /&gt;How can we destroy the session, how can we unset the variable of a session?&lt;br /&gt;&lt;br /&gt;session_unregister() - Unregister a global variable from the current session&lt;br /&gt;&lt;br /&gt;session_unset() - Free all session variables&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#333399;"&gt;What are the different functions in sorting an&lt;br /&gt;array? &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Sorting functions in PHP:&lt;br /&gt;&lt;br /&gt;asort()&lt;br /&gt;&lt;br /&gt;arsort()&lt;br /&gt;&lt;br /&gt;ksort()&lt;br /&gt;&lt;br /&gt;krsort()&lt;br /&gt;&lt;br /&gt;uksort()&lt;br /&gt;&lt;br /&gt;sort()&lt;br /&gt;&lt;br /&gt;natsort()&lt;br /&gt;&lt;br /&gt;rsort()&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#0000ff;"&gt;How can we know the count/number of elements of&lt;br /&gt;an array? &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;2 ways:&lt;br /&gt;&lt;br /&gt;a) sizeof($array) - This function is an alias of count()&lt;br /&gt;&lt;br /&gt;b) count($urarray) - This function returns the number of elements in an array.&lt;br /&gt;&lt;br /&gt;Interestingly if you just pass a simple var instead of an array, count() will&lt;br /&gt;return 1.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;strong&gt;How many ways we can pass the variable through&lt;br /&gt;the navigation between the pages? &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;At least 3 ways: &lt;/p&gt;&lt;br /&gt;&lt;p&gt;1. Put the variable into session in the first page, and get it back from session&lt;br /&gt;in the next page.&lt;br /&gt;&lt;br /&gt;2. Put the variable into cookie in the first page, and get it back from the&lt;br /&gt;cookie in the next page.&lt;br /&gt;&lt;br /&gt;3. Put the variable into a hidden form field, and get it back from the form&lt;br /&gt;in the next page.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#6633cc;"&gt;What is the maximum length of a table name, a&lt;br /&gt;database name, or a field name in MySQL? &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Database name: 64 characters&lt;br /&gt;&lt;br /&gt;Table name: 64 characters&lt;br /&gt;&lt;br /&gt;Column name: 64 characters&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#6666ff;"&gt;How many values can the SET function of MySQL&lt;br /&gt;take? &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;MySQL SET function can take zero or more values, but at the maximum it can take&lt;br /&gt;64 values.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#9900cc;"&gt;&lt;strong&gt;What are the other commands to know the structure&lt;br /&gt;of a table using MySQL commands except EXPLAIN command?&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;&lt;span style="color:#666666;"&gt;DESCRIBE table_name; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#ff0000;"&gt;How can we find the number of rows in a table&lt;br /&gt;using MySQ&lt;/span&gt;&lt;/strong&gt;L?&lt;br /&gt;&lt;br /&gt;Use this for MySQL&lt;/p&gt;&lt;br /&gt;&lt;p&gt;SELECT COUNT(*) FROM table_name;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#6633ff;"&gt;&lt;strong&gt;What’s the difference between md5(), crc32()&lt;br /&gt;and sha1() crypto on PHP? &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The major difference is the length of the hash generated. CRC32 is, evidently,&lt;br /&gt;32 bits, while sha1() returns a 128 bit value, and md5() returns a 160 bit value.&lt;br /&gt;This is important when avoiding collisions.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff9900;"&gt;&lt;strong&gt;How can we find the number of rows in a result&lt;br /&gt;set using PHP? &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Here is how can you find the number of rows in a result set in PHP:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;$result = mysql_query($any_valid_sql, $database_link);&lt;br /&gt;&lt;br /&gt;$num_rows = mysql_num_rows($result);&lt;br /&gt;&lt;br /&gt;echo "$num_rows rows found";&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#ff6600;"&gt;How many ways we can we find the current date&lt;br /&gt;using MySQL? &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;SELECT CURDATE();&lt;br /&gt;&lt;br /&gt;SELECT CURRENT_DATE();&lt;br /&gt;&lt;br /&gt;SELECT CURTIME();&lt;br /&gt;&lt;br /&gt;SELECT CURRENT_TIME();&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff33ff;"&gt;&lt;strong&gt;Give the syntax of GRANT commands? &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The generic syntax for GRANT is as following&lt;/p&gt;&lt;br /&gt;&lt;p&gt;GRANT [rights] on [database] TO [username@hostname] IDENTIFIED BY [password]&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Now rights can be:&lt;br /&gt;&lt;br /&gt;a) ALL privilages&lt;br /&gt;&lt;br /&gt;b) Combination of CREATE, DROP, SELECT, INSERT, UPDATE and DELETE etc.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;We can grant rights on all databse by usingh *.* or some specific database&lt;br /&gt;by database.* or a specific table by database.table_name.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Give the syntax of REVOKE commands?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The generic syntax for revoke is as following&lt;/p&gt;&lt;br /&gt;&lt;p&gt;REVOKE [rights] on [database] FROM [username@hostname]&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Now rights can be:&lt;br /&gt;&lt;br /&gt;a) ALL privileges&lt;br /&gt;&lt;br /&gt;b) Combination of CREATE, DROP, SELECT, INSERT, UPDATE and DELETE etc.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;We can grant rights on all database by using *.* or some specific database&lt;br /&gt;by database.* or a specific table by database.table_name.&lt;br /&gt;&lt;br /&gt;What is the difference between CHAR and VARCHAR data types?&lt;br /&gt;&lt;br /&gt;CHAR is a fixed length data type. CHAR(n) will take n characters of storage&lt;br /&gt;even if you enter less than n characters to that column. For example, "Hello!"&lt;br /&gt;will be stored as "Hello! " in CHAR(10) column. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;VARCHAR is a variable length data type. VARCHAR(n) will take only the required&lt;br /&gt;storage for the actual number of characters entered to that column. For example,&lt;br /&gt;"Hello!" will be stored as "Hello!" in VARCHAR(10) column.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;How can we encrypt and decrypt a data present in a mysql table using mysql?&lt;br /&gt;&lt;br /&gt;AES_ENCRYPT() and AES_DECRYPT()&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;strong&gt;Will comparison of string "10" and integer&lt;br /&gt;11 work in PHP? &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Yes, internally PHP will cast everything to the integer type, so numbers 10&lt;br /&gt;and 11 will be compared.&lt;br /&gt;&lt;br /&gt;What is the functionality of MD5 function in PHP?&lt;br /&gt;&lt;br /&gt;string md5(string)&lt;/p&gt;&lt;br /&gt;&lt;p&gt;It calculates the MD5 hash of a string. The hash is a 32-character hexadecimal&lt;br /&gt;number.&lt;br /&gt;&lt;br /&gt;How can I load data from a text file into a table?&lt;br /&gt;&lt;br /&gt;The MySQL provides a LOAD DATA INFILE command. You can load data from a file.&lt;br /&gt;Great tool but you need to make sure that:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;a) Data must be delimited&lt;br /&gt;&lt;br /&gt;b) Data fields must match table columns correctly&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff6600;"&gt;&lt;strong&gt;How can we know the number of days between two&lt;br /&gt;given dates using MySQL? &lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;Use DATEDIFF()&lt;/p&gt;&lt;br /&gt;&lt;p&gt;SELECT DATEDIFF(NOW(),'2006-07-01');&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#990000;"&gt;&lt;strong&gt;How can we change the name of a column of a table?&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This will change the name of column:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;ALTER TABLE table_name CHANGE old_colm_name new_colm_name&lt;br /&gt;&lt;br /&gt;How can we change the data type of a column of a table?&lt;br /&gt;&lt;br /&gt;This will change the data type of a column:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;ALTER TABLE table_name CHANGE colm_name same_colm_name [new data type]&lt;br /&gt;&lt;br /&gt;What is the difference between GROUP BY and ORDER BY in SQL?&lt;br /&gt;&lt;br /&gt;To sort a result, use an ORDER BY clause.&lt;br /&gt;&lt;br /&gt;The most general way to satisfy a GROUP BY clause is to scan the whole table&lt;br /&gt;and create a new temporary table where all rows from each group are consecutive,&lt;br /&gt;and then use this temporary table to discover groups and apply aggregate functions&lt;br /&gt;(if any).&lt;br /&gt;&lt;br /&gt;ORDER BY [col1],[col2],...[coln]; Tells DBMS according to what columns it should&lt;br /&gt;sort the result. If two rows will have the same value in col1 it will try to&lt;br /&gt;sort them according to col2 and so on.&lt;br /&gt;&lt;br /&gt;GROUP BY [col1],[col2],...[coln]; Tells DBMS to group (aggregate) results with&lt;br /&gt;same value of column col1. You can use COUNT(col1), SUM(col1), AVG(col1) with&lt;br /&gt;it, if you want to count all items in group, sum all values or view average.&lt;br /&gt;&lt;br /&gt;What is meant by MIME?&lt;br /&gt;&lt;br /&gt;Answer 1:&lt;br /&gt;&lt;br /&gt;MIME is Multipurpose Internet Mail Extensions is an Internet standard for the&lt;br /&gt;format of e-mail. However browsers also uses MIME standard to transmit files.&lt;br /&gt;MIME has a header which is added to a beginning of the data. When browser sees&lt;br /&gt;such header it shows the data as it would be a file (for example image)&lt;br /&gt;&lt;br /&gt;Some examples of MIME types:&lt;br /&gt;&lt;br /&gt;audio/x-ms-wmp&lt;br /&gt;&lt;br /&gt;image/png&lt;br /&gt;&lt;br /&gt;application/x-shockwave-flash&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer 2:&lt;br /&gt;&lt;br /&gt;Multipurpose Internet Mail Extensions.&lt;br /&gt;&lt;br /&gt;WWW's ability to recognize and handle files of different types is largely dependent&lt;br /&gt;on the use of the MIME (Multipurpose Internet Mail Extensions) standard. The&lt;br /&gt;standard provides for a system of registration of file types with information&lt;br /&gt;about the applications needed to process them. This information is incorporated&lt;br /&gt;into Web server and browser software, and enables the automatic recognition&lt;br /&gt;and display of registered file types. …&lt;br /&gt;&lt;br /&gt;How can we know that a session is started or not?&lt;br /&gt;&lt;br /&gt;A session starts by session_start() function.&lt;br /&gt;&lt;br /&gt;This session_start() is always declared in header portion. it always declares&lt;br /&gt;first. then we write session_register().&lt;br /&gt;&lt;br /&gt;What are the differences between  mysql_fetch_array(),  mysql_fetch_object(), &lt;br /&gt;mysql_fetch_row()?&lt;br /&gt;&lt;br /&gt;Answer 1:&lt;br /&gt;&lt;br /&gt;mysql_fetch_array() -&amp;gt; Fetch a result row as a combination of associative&lt;br /&gt;array and regular array.&lt;br /&gt;&lt;br /&gt;mysql_fetch_object() -&amp;gt; Fetch a result row as an object.&lt;br /&gt;&lt;br /&gt;mysql_fetch_row() -&amp;gt; Fetch a result set as a regular array().&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer 2:&lt;br /&gt;&lt;br /&gt;The difference between mysql_fetch_row() and mysql_fetch_array() is that the&lt;br /&gt;first returns the results in a numeric array ($row[0], $row[1], etc.), while&lt;br /&gt;the latter returns a the results an array containing both numeric and associative&lt;br /&gt;keys ($row['name'], $row['email'], etc.). mysql_fetch_object() returns an object&lt;br /&gt;($row-&amp;gt;name, $row-&amp;gt;email, etc.).&lt;br /&gt;&lt;br /&gt;If we login more than one browser windows at the same time with same user and&lt;br /&gt;after that we close one window, then is the session is exist to other windows&lt;br /&gt;or not? And if yes then why? If no then why?&lt;br /&gt;&lt;br /&gt;Session depends on browser. If browser is closed then session is lost. The session&lt;br /&gt;data will be deleted after session time out. If connection is lost and you recreate&lt;br /&gt;connection, then session will continue in the browser.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff3300;"&gt;&lt;strong&gt;What are the MySQL database files stored in system&lt;br /&gt;? &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Data is stored in name.myd&lt;br /&gt;&lt;br /&gt;Table structure is stored in name.frm&lt;br /&gt;&lt;br /&gt;Index is stored in name.myi&lt;br /&gt;&lt;br /&gt;What is the difference between PHP4 and PHP5?&lt;br /&gt;&lt;br /&gt;PHP4 cannot support oops concepts and Zend engine 1 is used.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;PHP5 supports oops concepts and Zend engine 2 is used.&lt;br /&gt;&lt;br /&gt;Error supporting is increased in PHP5.&lt;br /&gt;&lt;br /&gt;XML and SQLLite will is increased in PHP5.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#990066;"&gt;&lt;strong&gt;Can we use include(abc.PHP) two times in a PHP&lt;br /&gt;page makeit.PHP”? &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Yes we can include that many times we want, but here are some things to make&lt;br /&gt;sure of:&lt;br /&gt;&lt;br /&gt;(including abc.PHP, the file names are case-sensitive)&lt;br /&gt;&lt;br /&gt;there shouldn't be any duplicate function names, means there should not be functions&lt;br /&gt;or classes or variables with the same name in abc.PHP and makeit.php&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#993399;"&gt;&lt;strong&gt;What are the differences between mysql_fetch_array(),&lt;br /&gt;mysql_fetch_object(), mysql_fetch_row()? &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;mysql_fetch_array - Fetch a result row as an associative array and a numeric&lt;br /&gt;array.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;mysql_fetch_object - Returns an object with properties that correspond to the&lt;br /&gt;fetched row and moves the internal data pointer ahead. Returns an object with&lt;br /&gt;properties that correspond to the fetched row, or FALSE if there are no more&lt;br /&gt;rows&lt;/p&gt;&lt;br /&gt;&lt;p&gt;mysql_fetch_row() - Fetches one row of data from the result associated with&lt;br /&gt;the specified result identifier. The row is returned as an array. Each result&lt;br /&gt;column is stored in an array offset, starting at offset 0.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#ff3300;"&gt;What is meant by nl2br()? &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Anwser1:&lt;br /&gt;&lt;br /&gt;nl2br() inserts a HTML tag &amp;lt;br&amp;gt; before all new line characters \n in a&lt;br /&gt;string.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;echo nl2br("god bless \n you");&lt;/p&gt;&lt;br /&gt;&lt;p&gt;output:&lt;br /&gt;&lt;br /&gt;god bless&amp;lt;br&amp;gt;&lt;br /&gt;&lt;br /&gt;you&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#990000;"&gt;&lt;strong&gt;How can we encrypt and decrypt a data presented&lt;br /&gt;in a table using MySQL? &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can use functions: AES_ENCRYPT() and AES_DECRYPT() like: &lt;/p&gt;&lt;br /&gt;&lt;p&gt;AES_ENCRYPT(str, key_str)&lt;br /&gt;&lt;br /&gt;AES_DECRYPT(crypt_str, key_str)&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#cc3300;"&gt;&lt;strong&gt;How can I retrieve values from one database server&lt;br /&gt;and store them in other database server using PHP? &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;For this purpose, you can first read the data from one server into session variables.&lt;br /&gt;Then connect to other server and simply insert the data into the database. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Who is the father of PHP and what is the current version of PHP and MYSQL?&lt;br /&gt;&lt;br /&gt;Rasmus Lerdorf.&lt;br /&gt;&lt;br /&gt;PHP 5.1. Beta&lt;br /&gt;&lt;br /&gt;MySQL 5.0&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;In how many ways we can retrieve data in the result set of MYSQL using&lt;br /&gt;PHP? &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;mysql_fetch_array - Fetch a result row as an associative array, a numeric array,&lt;br /&gt;or both&lt;br /&gt;&lt;br /&gt;mysql_fetch_assoc - Fetch a result row as an associative array&lt;br /&gt;&lt;br /&gt;mysql_fetch_object - Fetch a result row as an object&lt;br /&gt;&lt;br /&gt;mysql_fetch_row —- Get a result row as an enumerated array&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What are the functions for IMAP? &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;imap_body - Read the message body&lt;br /&gt;&lt;br /&gt;imap_check - Check current mailbox&lt;br /&gt;&lt;br /&gt;imap_delete - Mark a message for deletion from current mailbox&lt;br /&gt;&lt;br /&gt;imap_mail - Send an email message&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#9900ff;"&gt;&lt;strong&gt;What are encryption functions in PHP? &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;CRYPT()&lt;br /&gt;&lt;br /&gt;MD5()&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What is the difference between htmlentities() and htmlspecialchars()?&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;htmlspecialchars() - Convert some special characters to HTML entities (Only&lt;br /&gt;the most widely used)&lt;br /&gt;&lt;br /&gt;htmlentities() - Convert ALL special characters to HTML entities&lt;br /&gt;&lt;br /&gt;What is the functionality of the function htmlentities?&lt;br /&gt;&lt;br /&gt;htmlentities() - Convert all applicable characters to HTML entities&lt;br /&gt;&lt;br /&gt;This function is identical to htmlspecialchars() in all ways, except with htmlentities(),&lt;br /&gt;all characters which have HTML character entity equivalents are translated into&lt;br /&gt;these entities.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff6600;"&gt;&lt;strong&gt;How can we get the properties (size, type, width,&lt;br /&gt;height) of an image using php image functions? &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To know the image size use getimagesize() function&lt;br /&gt;&lt;br /&gt;To know the image width use imagesx() function&lt;br /&gt;&lt;br /&gt;To know the image height use imagesy() function&lt;br /&gt;&lt;br /&gt;How can we increase the execution time of a php script?&lt;br /&gt;&lt;br /&gt;By the use of void set_time_limit(int seconds)&lt;br /&gt;&lt;br /&gt;Set the number of seconds a script is allowed to run. If this is reached, the&lt;br /&gt;script returns a fatal error. The default limit is 30 seconds or, if it exists,&lt;br /&gt;the max_execution_time value defined in the php.ini. If seconds is set to zero,&lt;br /&gt;no time limit is imposed. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;When called, set_time_limit() restarts the timeout counter from zero. In other&lt;br /&gt;words, if the timeout is the default 30 seconds, and 25 seconds into script&lt;br /&gt;execution a call such as set_time_limit(20) is made, the script will run for&lt;br /&gt;a total of 45 seconds before timing out.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#ff6633;"&gt;HOW CAN WE TAKE A BACKUP OF A MYSQL TABLE AND&lt;br /&gt;HOW CAN WE RESTORE IT? &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Answer 1:&lt;br /&gt;&lt;br /&gt;Create a full backup of your database: shell&amp;gt; mysqldump tab=/path/to/some/dir&lt;br /&gt;opt db_name&lt;br /&gt;&lt;br /&gt;Or: shell&amp;gt; mysqlhotcopy db_name /path/to/some/dir&lt;br /&gt;&lt;br /&gt;The full backup file is just a set of SQL statements, so restoring it is very&lt;br /&gt;easy: &lt;/p&gt;&lt;br /&gt;&lt;p&gt;shell&amp;gt; mysql "."Executed";&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer 2:&lt;br /&gt;&lt;br /&gt;To backup: BACKUP TABLE tbl_name TO /path/to/backup/directory&lt;br /&gt;&lt;br /&gt;’ To restore: RESTORE TABLE tbl_name FROM /path/to/backup/directory&lt;/p&gt;&lt;br /&gt;&lt;p&gt;mysqldump: Dumping Table Structure and Data &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Utility to dump a database or a collection of database for backup or for transferring&lt;br /&gt;the data to another SQL server (not necessarily a MySQL server). The dump will&lt;br /&gt;contain SQL statements to create the table and/or populate the table.&lt;br /&gt;&lt;br /&gt;-t, no-create-info&lt;br /&gt;&lt;br /&gt;Don't write table creation information (the CREATE TABLE statement).&lt;br /&gt;&lt;br /&gt;-d, no-data&lt;br /&gt;&lt;br /&gt;Don't write any row information for the table. This is very useful if you just&lt;br /&gt;want to get a dump of the structure for a table!&lt;br /&gt;&lt;br /&gt;How to set cookies?&lt;br /&gt;&lt;br /&gt;setcookie('variable','value','time')&lt;br /&gt;&lt;br /&gt;;&lt;br /&gt;&lt;br /&gt;variable - name of the cookie variable&lt;br /&gt;&lt;br /&gt;value - value of the cookie variable&lt;br /&gt;&lt;br /&gt;time - expiry time&lt;br /&gt;&lt;br /&gt;Example: setcookie('Test',$i,time()+3600);&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Test - cookie variable name&lt;br /&gt;&lt;br /&gt;$i - value of the variable 'Test'&lt;br /&gt;&lt;br /&gt;time()+3600 - denotes that the cookie will expire after an one hour&lt;br /&gt;&lt;br /&gt;How to reset/destroy a cookie ?&lt;br /&gt;&lt;br /&gt;Reset a cookie by specifying expire time in the past:&lt;br /&gt;&lt;br /&gt;Example: setcookie('Test',$i,time()-3600); // already expired time &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Reset a cookie by specifying its name only&lt;br /&gt;&lt;br /&gt;Example: setcookie('Test');&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#9900cc;"&gt;What types of images that PHP supports ? &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Using imagetypes() function to find out what types of images are supported in&lt;br /&gt;your PHP engine.&lt;br /&gt;&lt;br /&gt;imagetypes() - Returns the image types supported.&lt;br /&gt;&lt;br /&gt;This function returns a bit-field corresponding to the image formats supported&lt;br /&gt;by the version of GD linked into PHP. The following bits are returned, IMG_GIF&lt;br /&gt; IMG_JPG  IMG_PNG  IMG_WBMP  IMG_XPM.&lt;br /&gt;&lt;br /&gt;Check if a variable is an integer in JAVASCRIPT ?&lt;br /&gt;&lt;br /&gt;var myValue =9.8;&lt;br /&gt;&lt;br /&gt;if(parseInt(myValue)== myValue)&lt;br /&gt;&lt;br /&gt;alert('Integer');&lt;br /&gt;&lt;br /&gt;else&lt;br /&gt;&lt;br /&gt;alert('Not an integer');&lt;br /&gt;&lt;br /&gt;Tools used for drawing ER diagrams.&lt;br /&gt;&lt;br /&gt;Case Studio&lt;br /&gt;&lt;br /&gt;Smart Draw&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;color:#990099;"&gt;&lt;strong&gt;How can I know that a variable is a number or not using&lt;br /&gt;a JavaScript? &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Answer 1:&lt;br /&gt;&lt;br /&gt;bool is_numeric( mixed var)&lt;br /&gt;&lt;br /&gt;Returns TRUE if var is a number or a numeric string, FALSE otherwise. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Answer 2:&lt;br /&gt;&lt;br /&gt;Definition and Usage&lt;br /&gt;&lt;br /&gt;The isNaN() function is used to check if a value is not a number. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Syntax&lt;br /&gt;&lt;br /&gt;isNaN(number)&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Parameter Description&lt;br /&gt;&lt;br /&gt;number Required. The value to be tested&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#6633cc;"&gt;&lt;strong&gt;How can we submit from without a submit button?&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Trigger the JavaScript code on any event ( like onSelect of drop down list box,&lt;br /&gt;onfocus, etc ) document.myform.submit(); This will submit the form.&lt;br /&gt;&lt;br /&gt;How many ways can we get the value of current session id?&lt;br /&gt;&lt;br /&gt;session_id() returns the session id for the current session.&lt;br /&gt;&lt;br /&gt;How can we destroy the cookie?&lt;br /&gt;&lt;br /&gt;Set the cookie with a past expiration time.&lt;br /&gt;&lt;br /&gt;What are the current versions of Apache, PHP, and MySQL?&lt;br /&gt;&lt;br /&gt;PHP: PHP 5.1.2&lt;br /&gt;&lt;br /&gt;MySQL: MySQL 5.1&lt;br /&gt;&lt;br /&gt;Apache: Apache 2.1&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#990099;"&gt;&lt;strong&gt;What are the reasons for selecting LAMP (Linux,&lt;br /&gt;Apache, MySQL, Php) instead of combination of other software programs, servers&lt;br /&gt;and operating systems? &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;All of those are open source resource. Security of  Linux is very more&lt;br /&gt;than windows. Apache is a better server that IIS both in functionality and security.&lt;br /&gt;Mysql is world most popular open source database. Php is more faster that asp&lt;br /&gt;or any other scripting language.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;&lt;strong&gt;What are the features and advantages of OBJECT&lt;br /&gt;ORIENTED PROGRAMMING? &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;One of the main advantages of OO programming is its ease of modification; objects&lt;br /&gt;can easily be modified and added to a system there by reducing maintenance costs.&lt;br /&gt;OO programming is also considered to be better at modeling the real world than&lt;br /&gt;is procedural programming. It allows for more complicated and flexible interactions.&lt;br /&gt;OO systems are also easier for non-technical personnel to understand and easier&lt;br /&gt;for them to participate in the maintenance and enhancement of a system because&lt;br /&gt;it appeals to natural human cognition patterns. For some systems, an OO approach&lt;br /&gt;can speed development time since many objects are standard across systems and&lt;br /&gt;can be reused. Components that manage dates, shipping, shopping carts, etc.&lt;br /&gt;can be purchased and easily modified for a specific system.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff6600;"&gt;&lt;strong&gt;How can we get second of the current time using&lt;br /&gt;date function? &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;$second = date("s");&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What is the use of friend function?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Friend functions&lt;br /&gt;&lt;br /&gt;Sometimes a function is best shared among a number of different classes. Such&lt;br /&gt;functions can be declared either as member functions of one class or as global&lt;br /&gt;functions. In either case they can be set to be friends of other classes, by&lt;br /&gt;using a friend specifier in the class that is admitting them. Such functions&lt;br /&gt;can use all attributes of the class which names them as a friend, as if they&lt;br /&gt;were themselves members of that class.&lt;br /&gt;&lt;br /&gt;A friend declaration is essentially a prototype for a member function, but instead&lt;br /&gt;of requiring an implementation with the name of that class attached by the double&lt;br /&gt;colon syntax, a global function or member function of another class provides&lt;br /&gt;the match.&lt;br /&gt;&lt;br /&gt;class mylinkage&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;private:&lt;br /&gt;&lt;br /&gt;mylinkage * prev;&lt;br /&gt;&lt;br /&gt;mylinkage * next;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;protected:&lt;br /&gt;&lt;br /&gt;friend void set_prev(mylinkage* L, mylinkage* N);&lt;br /&gt;&lt;br /&gt;void set_next(mylinkage* L);&lt;/p&gt;&lt;br /&gt;&lt;p&gt;public:&lt;br /&gt;&lt;br /&gt;mylinkage * succ();&lt;br /&gt;&lt;br /&gt;mylinkage * pred();&lt;br /&gt;&lt;br /&gt;mylinkage();&lt;br /&gt;&lt;br /&gt;};&lt;/p&gt;&lt;br /&gt;&lt;p&gt;void mylinkage::set_next(mylinkage* L) { next = L; }&lt;/p&gt;&lt;br /&gt;&lt;p&gt;void set_prev(mylinkage * L, mylinkage * N ) { N-&amp;gt;prev = L; }&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Friends in other classes&lt;br /&gt;&lt;br /&gt;It is possible to specify a member function of another class as a friend as&lt;br /&gt;follows:&lt;br /&gt;&lt;br /&gt;class C&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;friend int B::f1();&lt;br /&gt;&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;class B&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;int f1();&lt;br /&gt;&lt;br /&gt;};&lt;/p&gt;&lt;br /&gt;&lt;p&gt;It is also possible to specify all the functions in another class as friends,&lt;br /&gt;by specifying the entire class as a friend.&lt;br /&gt;&lt;br /&gt;class A&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;friend class B;&lt;br /&gt;&lt;br /&gt;};&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Friend functions allow binary operators to be defined which combine private&lt;br /&gt;data in a pair of objects. This is particularly powerful when using the operator&lt;br /&gt;overloading features of C++. We will return to it when we look at overloading.&lt;br /&gt;&lt;br /&gt;How can we get second of the current time using date function?&lt;br /&gt;&lt;br /&gt;$second = date("s");&lt;br /&gt;&lt;br /&gt;What is the maximum size of a file that can be uploaded using PHP and how can&lt;br /&gt;we change this?&lt;br /&gt;&lt;br /&gt;You can change maximum size of a file set upload_max_filesize variable in php.ini&lt;br /&gt;file&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;&lt;strong&gt;How can I make a script that can be bilingual&lt;br /&gt;(supports English, German)? &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can change char set variable in above line in the script to support bi language.&lt;br /&gt;&lt;br /&gt;What are the difference between abstract class and interface?&lt;br /&gt;&lt;br /&gt;Abstract class: abstract classes are the class where one or more methods are&lt;br /&gt;abstract but not necessarily all method has to be abstract. Abstract methods&lt;br /&gt;are the methods, which are declare in its class but not define. The definition&lt;br /&gt;of those methods must be in its extending class. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Interface: Interfaces are one type of class where all the methods are abstract.&lt;br /&gt;That means all the methods only declared but not defined. All the methods must&lt;br /&gt;be define by its implemented class.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#6666cc;"&gt;&lt;strong&gt;What are the advantages of stored procedures,&lt;br /&gt;triggers, indexes? &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A stored procedure is a set of SQL commands that can be compiled and stored&lt;br /&gt;in the server. Once this has been done, clients don't need to keep re-issuing&lt;br /&gt;the entire query but can refer to the stored procedure. This provides better&lt;br /&gt;overall performance because the query has to be parsed only once, and less information&lt;br /&gt;needs to be sent between the server and the client. You can also raise the conceptual&lt;br /&gt;level by having libraries of functions in the server. However, stored procedures&lt;br /&gt;of course do increase the load on the database server system, as more of the&lt;br /&gt;work is done on the server side and less on the client (application) side. Triggers&lt;br /&gt;will also be implemented. A trigger is effectively a type of stored procedure,&lt;br /&gt;one that is invoked when a particular event occurs. For example, you can install&lt;br /&gt;a stored procedure that is triggered each time a record is deleted from a transaction&lt;br /&gt;table and that stored procedure automatically deletes the corresponding customer&lt;br /&gt;from a customer table when all his transactions are deleted. Indexes are used&lt;br /&gt;to find rows with specific column values quickly. Without an index, MySQL must&lt;br /&gt;begin with the first row and then read through the entire table to find the&lt;br /&gt;relevant rows. The larger the table, the more this costs. If the table has an&lt;br /&gt;index for the columns in question, MySQL can quickly determine the position&lt;br /&gt;to seek to in the middle of the data file without having to look at all the&lt;br /&gt;data. If a table has 1,000 rows, this is at least 100 times faster than reading&lt;br /&gt;sequentially. If you need to access most of the rows, it is faster to read sequentially,&lt;br /&gt;because this minimizes disk seeks.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#ff6600;"&gt;What is maximum size of a database in mysql?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;If the operating system or filesystem places a limit on the number of files&lt;br /&gt;in a directory, MySQL is bound by that constraint. The efficiency of the operating&lt;br /&gt;system in handling large numbers of files in a directory can place a practical&lt;br /&gt;limit on the number of tables in a database. If the time required to open a&lt;br /&gt;file in the directory increases significantly as the number of files increases,&lt;br /&gt;database performance can be adversely affected.&lt;br /&gt;&lt;br /&gt;The amount of available disk space limits the number of tables.&lt;br /&gt;&lt;br /&gt;MySQL 3.22 had a 4GB (4 gigabyte) limit on table size. With the MyISAM storage&lt;br /&gt;engine in MySQL 3.23, the maximum table size was increased to 65536 terabytes&lt;br /&gt;(2567 – 1 bytes). With this larger allowed table size, the maximum effective&lt;br /&gt;table size for MySQL databases is usually determined by operating system constraints&lt;br /&gt;on file sizes, not by MySQL internal limits.&lt;br /&gt;&lt;br /&gt;The InnoDB storage engine maintains InnoDB tables within a tablespace that can&lt;br /&gt;be created from several files. This allows a table to exceed the maximum individual&lt;br /&gt;file size. The tablespace can include raw disk partitions, which allows extremely&lt;br /&gt;large tables. The maximum tablespace size is 64TB.&lt;br /&gt;&lt;br /&gt;The following table lists some examples of operating system file-size limits.&lt;br /&gt;This is only a rough guide and is not intended to be definitive. For the most&lt;br /&gt;up-to-date information, be sure to check the documentation specific to your&lt;br /&gt;operating system.&lt;br /&gt;&lt;br /&gt;Operating System File-size Limit&lt;br /&gt;&lt;br /&gt;Linux 2.2-Intel 32-bit 2GB (LFS: 4GB)&lt;br /&gt;&lt;br /&gt;Linux 2.4+ (using ext3 filesystem) 4TB&lt;br /&gt;&lt;br /&gt;Solaris 9/10 16TB&lt;br /&gt;&lt;br /&gt;NetWare w/NSS filesystem 8TB&lt;br /&gt;&lt;br /&gt;Win32 w/ FAT/FAT32 2GB/4GB&lt;br /&gt;&lt;br /&gt;Win32 w/ NTFS 2TB (possibly larger)&lt;br /&gt;&lt;br /&gt;MacOS X w/ HFS+ 2TB&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;color:#6666ff;"&gt;&lt;strong&gt;Explain normalization concept? &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The normalization process involves getting our data to conform to three progressive&lt;br /&gt;normal forms, and a higher level of normalization cannot be achieved until the&lt;br /&gt;previous levels have been achieved (there are actually five normal forms, but&lt;br /&gt;the last two are mainly academic and will not be discussed). &lt;/p&gt;&lt;br /&gt;&lt;p&gt;First Normal Form&lt;br /&gt;&lt;br /&gt;The First Normal Form (or 1NF) involves removal of redundant data from horizontal&lt;br /&gt;rows. We want to ensure that there is no duplication of data in a given row,&lt;br /&gt;and that every column stores the least amount of information possible (making&lt;br /&gt;the field atomic). &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Second Normal Form&lt;br /&gt;&lt;br /&gt;Where the First Normal Form deals with redundancy of data across a horizontal&lt;br /&gt;row, Second Normal Form (or 2NF) deals with redundancy of data in vertical columns.&lt;br /&gt;As stated earlier, the normal forms are progressive, so to achieve Second Normal&lt;br /&gt;Form, your tables must already be in First Normal Form. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Third Normal Form&lt;br /&gt;&lt;br /&gt;I have a confession to make; I do not often use Third Normal Form. In Third&lt;br /&gt;Normal Form we are looking for data in our tables that is not fully dependant&lt;br /&gt;on the primary key, but dependant on another value in the table&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#6666cc;"&gt;&lt;strong&gt;What’s the difference between accessing&lt;br /&gt;a class method via -&amp;gt; and via ::? &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;:: is allowed to access methods that can perform static operations, i.e. those,&lt;br /&gt;which do not require object initialization.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#ff0000;"&gt;What are the advantages and disadvantages of CASCADE&lt;br /&gt;STYLE SHEETS? &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;External Style Sheets&lt;br /&gt;&lt;br /&gt;Advantages&lt;br /&gt;&lt;br /&gt;Can control styles for multiple documents at once Classes can be created for&lt;br /&gt;use on multiple HTML element types in many documents Selector and grouping methods&lt;br /&gt;can be used to apply styles under complex contexts &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Disadvantages&lt;br /&gt;&lt;br /&gt;An extra download is required to import style information for each document&lt;br /&gt;The rendering of the document may be delayed until the external style sheet&lt;br /&gt;is loaded Becomes slightly unwieldy for small quantities of style definitions&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Embedded Style Sheets&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff6633;"&gt;&lt;strong&gt;Advantages&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Classes can be created for use on multiple tag types in the document Selector&lt;br /&gt;and grouping methods can be used to apply styles under complex contexts No additional&lt;br /&gt;downloads necessary to receive style information &lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="color:#993366;"&gt;Disadvantage&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;This method can not control styles for multiple documents at once &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Inline Styles&lt;br /&gt;&lt;br /&gt;Advantages&lt;br /&gt;&lt;br /&gt;Useful for small quantities of style definitions Can override other style specification&lt;br /&gt;methods at the local level so only exceptions need to be listed in conjunction&lt;br /&gt;with other style methods &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Disadvantages&lt;br /&gt;&lt;br /&gt;Does not distance style information from content (a main goal of SGML/HTML)&lt;br /&gt;Can not control styles for multiple documents at once Author can not create&lt;br /&gt;or control classes of elements to control multiple element types within the&lt;br /&gt;document Selector grouping methods can not be used to create complex element&lt;br /&gt;addressing scenarios&lt;br /&gt;&lt;br /&gt;What type of inheritance that php supports?&lt;br /&gt;&lt;br /&gt;In PHP an extended class is always dependent on a single base class, that is,&lt;br /&gt;multiple inheritance is not supported. Classes are extended using the keyword&lt;br /&gt;'extends'.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;&lt;strong&gt;How can increase the performance of MySQL select&lt;br /&gt;query?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We can use LIMIT to stop MySql for further search in table after we have received&lt;br /&gt;our required no. of records, also we can use LEFT JOIN or RIGHT JOIN instead&lt;br /&gt;of full join in cases we have related data in two or more tables.&lt;br /&gt;&lt;br /&gt;How can we change the name of a column of a table?&lt;br /&gt;&lt;br /&gt;MySQL query to rename table: RENAME TABLE tbl_name TO new_tbl_name&lt;br /&gt;&lt;br /&gt;or,&lt;br /&gt;&lt;br /&gt;ALTER TABLE tableName CHANGE OldName newName.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;&lt;strong&gt;When you want to show some part of a text displayed&lt;br /&gt;on an HTML page in red font color? What different possibilities are there to&lt;br /&gt;do this? What are the &lt;/strong&gt;&lt;/span&gt;advantages/disadvantages of these methods?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;There are 2 ways to show some part of a text in red:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;1. Using HTML tag &amp;lt;font color="red"&amp;gt;&lt;br /&gt;&lt;br /&gt;2. Using HTML tag &amp;lt;span &amp;gt;&lt;br /&gt;&lt;br /&gt;When viewing an HTML page in a Browser, the Browser often keeps this page in&lt;br /&gt;its cache. What can be possible advantages/disadvantages of page caching? &lt;strong&gt;&lt;span style="color:#ff0000;"&gt;How&lt;br /&gt;can you prevent caching of a certain page (please give several alternate solutions)?&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;When you use the metatag in the header section at the beginning of an&lt;br /&gt;HTML Web page, the Web page may still be cached in the Temporary Internet Files&lt;br /&gt;folder. &lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;A page that Internet Explorer is browsing is not cached until half of the 64&lt;br /&gt;KB buffer is filled. Usually, metatags are inserted in the header section of&lt;br /&gt;an HTML document, which appears at the beginning of the document. When the HTML&lt;br /&gt;code is parsed, it is read from top to bottom. When the metatag is read, Internet&lt;br /&gt;Explorer looks for the existence of the page in cache at that exact moment.&lt;br /&gt;If it is there, it is removed. To properly prevent the Web page from appearing&lt;br /&gt;in the cache, place another header section at the end of the HTML document.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#990033;"&gt;What are the different ways to login to a remote&lt;br /&gt;server? Explain the means, advantages and disadvantages? &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;There is at least 3 ways to logon to a remote server:&lt;br /&gt;&lt;br /&gt;Use ssh or telnet if you concern with security&lt;br /&gt;&lt;br /&gt;You can also use rlogin to logon to a remote server.&lt;br /&gt;&lt;br /&gt;Please give a regular expression (preferably Perl/PREG style), which can be&lt;br /&gt;used to identify the URL from within a HTML link tag.&lt;br /&gt;&lt;br /&gt;Try this: /href="([^"]*)"/i&lt;br /&gt;&lt;br /&gt;How can I use the COM components in php?&lt;br /&gt;&lt;br /&gt;The COM class provides a framework to integrate (D)COM components into your&lt;br /&gt;PHP scripts.&lt;br /&gt;&lt;br /&gt;string COM::COM( string module_name [, string server_name [, int codepage]])&lt;br /&gt;- COM class constructor.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Parameters:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;module_name: name or class-id of the requested component.&lt;br /&gt;&lt;br /&gt;server_name: name of the DCOM server from which the component should be fetched.&lt;br /&gt;If NULL, localhost is assumed. To allow DCOM com, allow_dcom has to be set to&lt;br /&gt;TRUE in php.ini.&lt;br /&gt;&lt;br /&gt;codepage - specifies the codepage that is used to convert php-strings to unicode-strings&lt;br /&gt;and vice versa. Possible values are CP_ACP, CP_MACCP, CP_OEMCP, CP_SYMBOL, CP_THREAD_ACP,&lt;br /&gt;CP_UTF7 and CP_UTF8.&lt;br /&gt;&lt;br /&gt;Usage:&lt;br /&gt;&lt;br /&gt;$word-&amp;gt;Visible = 1; //open an empty document&lt;br /&gt;&lt;br /&gt;$word-&amp;gt;Documents-&amp;gt;Add(); //do some weird stuff&lt;br /&gt;&lt;br /&gt;$word-&amp;gt;Selection-&amp;gt;TypeText("This is a test…");&lt;br /&gt;&lt;br /&gt;$word-&amp;gt;Documents[1]-&amp;gt;SaveAs("Useless test.doc"); //closing word&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;$word-&amp;gt;Quit(); //free the object&lt;br /&gt;&lt;br /&gt;$word-&amp;gt;Release();&lt;br /&gt;&lt;br /&gt;$word = null;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#0000cc;"&gt;&lt;strong&gt;How many ways we can give the output to a browser?&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;HTML output&lt;br /&gt;&lt;br /&gt;PHP, ASP, JSP, Servlet Function&lt;br /&gt;&lt;br /&gt;Script Language output Function&lt;br /&gt;&lt;br /&gt;Different Type of embedded Package to output to a browser&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#0000ff;"&gt;What is the default session time in php and how&lt;br /&gt;can I change it? &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The default session time in php is until closing of browser&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#996666;"&gt;What changes I have to do in php.ini file for&lt;br /&gt;file uploading? &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Make the following line uncomment like:&lt;br /&gt;&lt;br /&gt;; Whether to allow HTTP file uploads.&lt;br /&gt;&lt;br /&gt;file_uploads = On&lt;br /&gt;&lt;br /&gt;; Temporary directory for HTTP uploaded files (will use system default if not&lt;br /&gt;&lt;br /&gt;; specified).&lt;br /&gt;&lt;br /&gt;upload_tmp_dir = C:\apache2triad\temp&lt;br /&gt;&lt;br /&gt;; Maximum allowed size for uploaded files.&lt;br /&gt;&lt;br /&gt;upload_max_filesize = 2M&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#993366;"&gt;&lt;strong&gt;How can I set a cron and how can I execute it&lt;br /&gt;in Unix, Linux, and windows?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Cron is very simply a Linux module that allows you to run commands at predetermined&lt;br /&gt;times or intervals. In Windows, it's called Scheduled Tasks. The name Cron is&lt;br /&gt;in fact derived from the same word from which we get the word chronology, which&lt;br /&gt;means order of time.&lt;br /&gt;&lt;br /&gt;The easiest way to use crontab is via the crontab command.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;# crontab&lt;/p&gt;&lt;br /&gt;&lt;p&gt;This command 'edits' the crontab. Upon employing this command, you will be&lt;br /&gt;able to enter the commands that you wish to run. My version of&lt;br /&gt;&lt;br /&gt;Linux uses the text editor vi. You can find information on using vi here.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The syntax of this file is very important – if you get it wrong, your&lt;br /&gt;crontab will not function properly. The syntax of the file should be as follows:&lt;br /&gt;&lt;br /&gt;minutes hours day_of_month month day_of_week command&lt;/p&gt;&lt;br /&gt;&lt;p&gt;All the variables, with the exception of the command itself, are numerical&lt;br /&gt;constants. In addition to an asterisk (*), which is a wildcard that allows any&lt;br /&gt;value, the ranges permitted for each field are as follows:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="color:#6666ff;"&gt;Minutes: 0-59&lt;br /&gt;&lt;br /&gt;Hours: 0-23&lt;br /&gt;&lt;br /&gt;Day_of_month: 1-31&lt;br /&gt;&lt;br /&gt;Month: 1-12&lt;br /&gt;&lt;br /&gt;Weekday: 0-6&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;We can also include multiple values for each entry, simply by separating each&lt;br /&gt;value with a comma.&lt;br /&gt;&lt;br /&gt;command can be any shell command and, as we will see momentarily, can also be&lt;br /&gt;used to execute a Web document such as a PHP file.&lt;br /&gt;&lt;br /&gt;So, if we want to run a script every Tuesday morning at 8:15 AM, our mycronjob&lt;br /&gt;file will contain the following content on a single line:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;15 8 * * 2 /path/to/scriptname&lt;/p&gt;&lt;br /&gt;&lt;p&gt;This all seems simple enough, right? Not so fast! If you try to run a PHP script&lt;br /&gt;in this manner, nothing will happen (barring very special configurations that&lt;br /&gt;have PHP compiled as an executable, as opposed to an Apache module). The reason&lt;br /&gt;is that, in order for PHP to be parsed, it needs to be passed through Apache.&lt;br /&gt;In other words, the page needs to be called via a browser or other means of&lt;br /&gt;retrieving &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Web content. For our purposes, I'll assume that your server configuration includes&lt;br /&gt;wget, as is the case with most default configurations. To test your configuration,&lt;br /&gt;log in to shell. If you're using an RPM-based system (e.g. Redhat or Mandrake),&lt;br /&gt;type the following:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;# wget help&lt;/p&gt;&lt;br /&gt;&lt;p&gt;If you are greeted with a wget package identification, it is installed in your&lt;br /&gt;system.&lt;br /&gt;&lt;br /&gt;You could execute the PHP by invoking wget on the URL to the page, like so:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="color:#6699ff;"&gt;# wget http://www.example.com/file.php&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Now, let's go back to the mailstock.php file we created in the first part of&lt;br /&gt;this article. We saved it in our document root, so it should be accessible via&lt;br /&gt;the Internet. Remember that we wanted it to run at 4PM Eastern time, and send&lt;br /&gt;you your precious closing bell report? Since I'm located in the Eastern timezone,&lt;br /&gt;we can go ahead and set up our crontab to use 4:00, but if you live elsewhere,&lt;br /&gt;you might have to compensate for the time difference when setting this value.&lt;br /&gt;&lt;br /&gt;This is what my crontab will look like:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;0 4 * * 1,2,3,4,5 we get http://www.example.com/mailstock.php&lt;br /&gt;&lt;br /&gt;Steps for the payment gateway processing?&lt;br /&gt;&lt;br /&gt;An online payment gateway is the interface between your merchant account and&lt;br /&gt;your Web site. The online payment gateway allows you to immediately verify credit&lt;br /&gt;card transactions and authorize funds on a customer's credit card directly from&lt;br /&gt;your Web site. It then passes the transaction off to your merchant bank for&lt;br /&gt;processing, commonly referred to as transaction batching&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#993333;"&gt;&lt;strong&gt;How many ways I can redirect a PHP page? &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Here are the possible ways of php page redirection.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;1. Using Java script:&lt;br /&gt;&lt;br /&gt;'; echo 'window.location.href="'.$filename.'";'; echo ''; echo '';&lt;br /&gt;echo ''; echo ''; } } redirect('http://maosjb.com'); ?&amp;gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;2. Using php function: header("Location:http://maosjb.com ");&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#6633cc;"&gt;List out different arguments in PHP header function?&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;void header ( string string [, bool replace [, int http_response_code]])&lt;br /&gt;&lt;br /&gt;What type of headers have to be added in the mail function to attach a file?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;$boundary = '--' . md5( uniqid ( rand() ) );&lt;br /&gt;&lt;br /&gt;$headers = "From: \"Me\"\n";&lt;br /&gt;&lt;br /&gt;$headers .= "MIME-Version: 1.0\n";&lt;br /&gt;&lt;br /&gt;$headers .= "Content-Type: multipart/mixed; boundary=\"$boundary\"";&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#990066;"&gt;What is the difference between Reply-to and Return-path&lt;br /&gt;in the headers of a mail function? &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Reply-to: Reply-to is where to delivery the reply of the mail.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Return-path: Return path is when there is a mail delivery failure occurs then&lt;br /&gt;where to delivery the failure notification. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="color:#ff6600;"&gt;How to store the uploaded file to the final location?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;move_uploaded_file ( string filename, string destination) &lt;/p&gt;&lt;br /&gt;&lt;p&gt;This function checks to ensure that the file designated by filename is a valid&lt;br /&gt;upload file (meaning that it was uploaded via PHP's HTTP POST upload mechanism).&lt;br /&gt;If the file is valid, it will be moved to the filename given by destination.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;If filename is not a valid upload file, then no action will occur, and move_uploaded_file()&lt;br /&gt;will return FALSE. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;If filename is a valid upload file, but cannot be moved for some reason, no&lt;br /&gt;action will occur, and move_uploaded_file() will return FALSE. Additionally,&lt;br /&gt;a warning will be issued.&lt;br /&gt;&lt;br /&gt;Explain about Type Juggling in php?&lt;br /&gt;&lt;br /&gt;PHP does not require (or support) explicit type definition in variable declaration;&lt;br /&gt;a variable's type is determined by the context in which that variable is used.&lt;br /&gt;That is to say, if you assign a string value to variable $var, $var becomes&lt;br /&gt;a string. If you then assign an integer value to $var, it becomes an integer.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;An example of PHP's automatic type conversion is the addition operator '+'.&lt;br /&gt;If any of the operands is a float, then all operands are evaluated as floats,&lt;br /&gt;and the result will be a float. Otherwise, the operands will be interpreted&lt;br /&gt;as integers, and the result will also be an integer. Note that this does NOT&lt;br /&gt;change the types of the operands themselves; the only change is in how the operands&lt;br /&gt;are evaluated. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;$foo += 2; // $foo is now an integer (2)&lt;br /&gt;&lt;br /&gt;$foo = $foo + 1.3; // $foo is now a float (3.3)&lt;br /&gt;&lt;br /&gt;$foo = 5 + "10 Little Piggies"; // $foo is integer (15)&lt;br /&gt;&lt;br /&gt;$foo = 5 + "10 Small Pigs"; // $foo is integer (15) &lt;/p&gt;&lt;br /&gt;&lt;p&gt;If the last two examples above seem odd, see String conversion to numbers.&lt;br /&gt;&lt;br /&gt;If you wish to change the type of a variable, see settype().&lt;br /&gt;&lt;br /&gt;If you would like to test any of the examples in this section, you can use the&lt;br /&gt;var_dump() function.&lt;br /&gt;&lt;br /&gt;Note: The behavior of an automatic conversion to array is currently undefined.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Since PHP (for historical reasons) supports indexing into strings via offsets&lt;br /&gt;using the same syntax as array indexing, the example above leads to a problem:&lt;br /&gt;should $a become an array with its first element being "f", or should&lt;br /&gt;"f" become the first character of the string $a? The current versions&lt;br /&gt;of PHP interpret the second assignment as a string offset identification, so&lt;br /&gt;$a becomes "f", the result of this automatic conversion however should&lt;br /&gt;be considered undefined. PHP 4 introduced the new curly bracket syntax to access&lt;br /&gt;characters in string, use this syntax instead of the one presented above:&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;strong&gt;How can I embed a java programme in php file and&lt;br /&gt;what changes have to be done in php.ini file? &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There are two possible ways to bridge PHP and Java: you can either integrate&lt;br /&gt;PHP into a Java Servlet environment, which is the more stable and efficient&lt;br /&gt;solution, or integrate Java support into PHP. The former is provided by a SAPI&lt;br /&gt;module that interfaces with the Servlet server, the latter by this Java extension.&lt;br /&gt;&lt;br /&gt;The Java extension provides a simple and effective means for creating and invoking&lt;br /&gt;methods on Java objects from PHP. The JVM is created using JNI, and everything&lt;br /&gt;runs in-process. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Example Code: &lt;/p&gt;&lt;br /&gt;&lt;p&gt;getProperty('java.version') . ''; echo 'Java vendor=' . $system-&amp;gt;getProperty('java.vendor')&lt;br /&gt;. ''; echo 'OS=' . $system-&amp;gt;getProperty('os.name') . ' ' . $system-&amp;gt;getProperty('os.version')&lt;br /&gt;. ' on ' . $system-&amp;gt;getProperty('os.arch') . ' '; // java.util.Date example&lt;br /&gt;$formatter = new Java('java.text.SimpleDateFormat', "EEEE, MMMM dd, yyyy&lt;br /&gt;'at' h:mm:ss a zzzz"); echo $formatter-&amp;gt;format(new Java('java.util.Date'));&lt;br /&gt;?&amp;gt; &lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="color:#6666cc;"&gt;The behaviour of these functions is affected by settings&lt;br /&gt;in php.ini.&lt;br /&gt;&lt;br /&gt;Table 1. Java configuration options&lt;br /&gt;&lt;br /&gt;Name&lt;br /&gt;&lt;br /&gt;Default&lt;br /&gt;&lt;br /&gt;Changeable&lt;br /&gt;&lt;br /&gt;java.class.path&lt;br /&gt;&lt;br /&gt;NULL&lt;br /&gt;&lt;br /&gt;PHP_INI_ALL&lt;br /&gt;&lt;br /&gt;Name Default Changeable&lt;br /&gt;&lt;br /&gt;java.home&lt;br /&gt;&lt;br /&gt;NULL&lt;br /&gt;&lt;br /&gt;PHP_INI_ALL&lt;br /&gt;&lt;br /&gt;java.library.path&lt;br /&gt;&lt;br /&gt;NULL&lt;br /&gt;&lt;br /&gt;PHP_INI_ALL&lt;br /&gt;&lt;br /&gt;java.library&lt;br /&gt;&lt;br /&gt;JAVALIB&lt;br /&gt;&lt;br /&gt;PHP_INI_ALL&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff6600;"&gt;&lt;strong&gt;Explain the ternary conditional operator in PHP?&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Expression preceding the ? is evaluated, if it’s true, then the expression&lt;br /&gt;preceding the : is executed, otherwise, the expression following : is executed.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#996633;"&gt;&lt;strong&gt;What’s the difference between include and&lt;br /&gt;require? &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It’s how they handle failures. If the file is not found by require(),&lt;br /&gt;it will cause a fatal error and halt the execution of the script. If the file&lt;br /&gt;is not found by include(), a warning will be issued, but execution will continue.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#993333;"&gt;&lt;strong&gt;How many ways can we get the value of current&lt;br /&gt;session id? &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;session_id() returns the session id for the current session.  &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6027565613860287103-2003946830840175219?l=phpgreat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpgreat.blogspot.com/feeds/2003946830840175219/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6027565613860287103&amp;postID=2003946830840175219' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6027565613860287103/posts/default/2003946830840175219'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6027565613860287103/posts/default/2003946830840175219'/><link rel='alternate' type='text/html' href='http://phpgreat.blogspot.com/2008/04/php-mysql-best-server-side-technology.html' title='PHP Mysql  Best server side technology'/><author><name>web Scientist</name><uri>http://www.blogger.com/profile/15599908111812889832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6027565613860287103.post-2246629797033578906</id><published>2008-04-17T18:07:00.000-07:00</published><updated>2008-04-17T18:15:21.385-07:00</updated><title type='text'>PHP mysql Interview Questions Answers , Best Tips</title><content type='html'>&lt;strong&gt;&lt;a href="http://phpmysqlgreat.blogspot.com"&gt;PHP Interview Questions   most common interview &lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;1. How can we optimize or increase the speed of a mysql select query?&lt;br /&gt;&lt;br /&gt;2. How many ways can we get the value of current session id?&lt;br /&gt;&lt;br /&gt;3. How can we destroy the session, how can we unset the variable of a session?&lt;br /&gt;&lt;br /&gt;4. How can we destroy the cookie?&lt;br /&gt;&lt;br /&gt;5. How many ways we can pass the variable through the navigation between the pages?&lt;br /&gt;&lt;br /&gt;6. What is the difference between ereg_replace() and eregi_replace()?&lt;br /&gt;&lt;br /&gt;7. What are the different functions in sorting an array?&lt;br /&gt;&lt;br /&gt;8. How can we know the count/number of elements of an array?&lt;br /&gt;&lt;br /&gt;9. What is the PHP predefined variable that tells the What types of images that PHP&lt;br /&gt;supports?&lt;br /&gt;&lt;br /&gt;10. How can I know that a variable is a number or not using a JavaScript?&lt;br /&gt;&lt;br /&gt;11. List out some tools through which we can draw E-R diagrams for mysql.&lt;br /&gt;&lt;br /&gt;12. How can I retrieve values from one database server and store them in other database server using PHP?&lt;br /&gt;&lt;br /&gt;13. List out the predefined classes in PHP?&lt;br /&gt;&lt;br /&gt;14. How can I make a script that can be bilanguage (supports English, German)?&lt;br /&gt;&lt;br /&gt;15. What are the difference between abstract class and interface?&lt;br /&gt;&lt;br /&gt;16. How can we send mail using JavaScript?&lt;br /&gt;&lt;br /&gt;17. What are the differences between Get and post methods in form submitting, give the&lt;br /&gt;case where we can use get and we can use post methods?&lt;br /&gt;&lt;br /&gt;18. Who is the father of PHP and explain the changes in PHP versions?&lt;br /&gt;&lt;br /&gt;19. How can we submit a form without a submit button?&lt;br /&gt;&lt;br /&gt;20. In how many ways we can retrieve the date in the result set of mysql using PHP?&lt;br /&gt;&lt;br /&gt;21. What is the difference between mysql_fetch_object and mysql_fetch_array?&lt;br /&gt;&lt;br /&gt;22. What is the difference between $message and $$message?&lt;br /&gt;&lt;br /&gt;23. How can we extract string ‘abc.com ‘ from a string ‘http://info@abc.com’ using regular expression of PHP?&lt;br /&gt;&lt;br /&gt;24. How can we create a database using PHP and mysql?&lt;br /&gt;&lt;br /&gt;25. What are the differences between require and include, include_once?&lt;br /&gt;&lt;br /&gt;26. Can we use include (”abc.PHP”) two times in a PHP page “makeit.PHP”?&lt;br /&gt;&lt;br /&gt;27. What are the different tables present in mysql, which type of table is generated when we are creating a table in the following syntax: create table employee(eno int(2),ename varchar(10)) ?&lt;br /&gt;&lt;br /&gt;28. Functions in IMAP, POP3 AND LDAP?&lt;br /&gt;&lt;br /&gt;29. How can I execute a PHP script using command line?&lt;br /&gt;&lt;br /&gt;30. Suppose your Zend engine supports the mode Then how can u configure your PHP Zend engine to support mode ?&lt;br /&gt;&lt;br /&gt;31. Shopping cart online validation i.e. how can we configure Paypal, etc.?&lt;br /&gt;&lt;br /&gt;32. What is meant by nl2br()?&lt;br /&gt;&lt;br /&gt;33. Draw the architecture of Zend engine?&lt;br /&gt;&lt;br /&gt;34. What are the current versions of apache, PHP, and mysql?&lt;br /&gt;&lt;br /&gt;35. What are the reasons for selecting lamp (linux, apache, mysql, PHP) instead of combination of other software programmes, servers and operating systems?&lt;br /&gt;&lt;br /&gt;36. How can we encrypt and decrypt a data present in a mysql table using mysql?&lt;br /&gt;&lt;br /&gt;37. How can we encrypt the username and password using PHP?&lt;br /&gt;&lt;br /&gt;38. What are the features and advantages of object-oriented programming?&lt;br /&gt;&lt;br /&gt;39. What are the differences between procedure-oriented languages and object-oriented languages?&lt;br /&gt;&lt;br /&gt;40. What is the use of friend function?&lt;br /&gt;&lt;br /&gt;41. What are the differences between public, private, protected, static, transient, final and volatile?&lt;br /&gt;&lt;br /&gt;42. What are the different types of errors in PHP?&lt;br /&gt;&lt;br /&gt;43. What is the functionality of the function strstr and stristr?&lt;br /&gt;&lt;br /&gt;44. What are the differences between PHP 3 and PHP 4 and PHP 5?&lt;br /&gt;&lt;br /&gt;45. How can we convert asp pages to PHP pages?&lt;br /&gt;&lt;br /&gt;46. What is the functionality of the function htmlentities?&lt;br /&gt;&lt;br /&gt;47. How can we get second of the current time using date function?&lt;br /&gt;&lt;br /&gt;48. How can we convert the time zones using PHP?&lt;br /&gt;&lt;br /&gt;49. What is meant by urlencode and urldocode?&lt;br /&gt;&lt;br /&gt;50. What is the difference between the functions unlink and unset?&lt;br /&gt;&lt;br /&gt;51. How can we register the variables into a session?&lt;br /&gt;&lt;br /&gt;52. How can we get the properties (size, type, width, height) of an image using PHP&lt;br /&gt;image functions?&lt;br /&gt;&lt;br /&gt;53. How can we get the browser properties using PHP?&lt;br /&gt;&lt;br /&gt;54. What is the maximum size of a file that can be uploaded using PHP and how can we change this?&lt;br /&gt;&lt;br /&gt;55. How can we increase the execution time of a PHP script?&lt;br /&gt;&lt;br /&gt;56. How can we take a backup of a mysql table and how can we restore it. ?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6027565613860287103-2246629797033578906?l=phpgreat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpgreat.blogspot.com/feeds/2246629797033578906/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6027565613860287103&amp;postID=2246629797033578906' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6027565613860287103/posts/default/2246629797033578906'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6027565613860287103/posts/default/2246629797033578906'/><link rel='alternate' type='text/html' href='http://phpgreat.blogspot.com/2008/04/php-mysql-interview-questions.html' title='PHP mysql Interview Questions Answers , Best Tips'/><author><name>web Scientist</name><uri>http://www.blogger.com/profile/15599908111812889832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6027565613860287103.post-7480701082187319449</id><published>2008-04-17T17:38:00.000-07:00</published><updated>2008-05-01T17:17:30.487-07:00</updated><title type='text'>PHP MYSQL  Best OSS, lets Know it!!!</title><content type='html'>&lt;div align="left"&gt;&lt;span style="color:#ff6600;"&gt;&lt;strong&gt;Learn PHP Mysql - A future Best technology&lt;/strong&gt;&lt;/span&gt;&lt;a href="http://phpmysqlgreat.blogspot.com/"&gt;download php question&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family:verdana;color:#333399;"&gt;&lt;em&gt;What does a special set of tags &lt;?= and ?&gt;do in PHP? - The output is displayed directly to the browser.&lt;br /&gt;&lt;span style="color:#333300;"&gt;What’s the difference between include and require? - It’s how they&lt;/span&gt; handle failures. If the file is not found by require(), it will cause a fatal error and halt the execution of the script. If the file is not found by include(), a warning will be issued, but execution will continue.&lt;br /&gt;I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what’s the problem? - PHP Interpreter treats numbers beginning with 0 as octal. Look at the similar PHP interview questions for more numeric problems.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#cc0000;"&gt;Would I use print "$a dollars" or "{$a} dollars" to print out the amount of dollars in this example? &lt;/span&gt;- In this example it wouldn’t matter, since the variable is all by itself, but if you were to print something like "{$a},000,000 mln dollars", then you definitely need to use the braces.&lt;br /&gt;How do you define a constant? - Via define() directive, like define ("MYCONSTANT", 100);&lt;br /&gt;How do you pass a variable by value? - Just like in C++, put an ampersand in front of it, like $a = &amp;amp;$b&lt;br /&gt;Will comparison of string "10" and integer 11 work in PHP? - Yes, internally PHP will cast everything to the integer type, so numbers 10 and 11 will be compared.&lt;br /&gt;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.&lt;br /&gt;Explain the ternary conditional operator in PHP? - Expression preceding the ? is evaluated, if it’s true, then the expression preceding the : is executed, otherwise, the expression following : is executed.&lt;br /&gt;How do I find out the number of parameters passed into function? - func_num_args() function returns the number of parameters passed in.&lt;br /&gt;If the variable $a is equal to 5 and variable $b is equal to character a, what’s the value of $$b? - 100, it’s a reference to existing variable.&lt;br /&gt;What’s the difference between accessing a class method via -&gt; and via ::? - :: is allowed to access methods that can perform static operations, i.e. those, which do not require object initialization.&lt;br /&gt;Are objects passed by value or by reference? - Everything is passed by value.&lt;br /&gt;How do you call a constructor for a parent class? - parent::constructor($value)&lt;br /&gt;What’s the special meaning of __sleep and __wakeup? - __sleep returns the array of all the variables than need to be saved, while __wakeup retrieves them.&lt;br /&gt;Why doesn’t the following code print the newline properly? &lt;?php             $str = ‘Hello, there.\nHow are you?\nThanks for visiting TechInterviews’;             print $str;     ?&gt;&lt;br /&gt;Because inside the single quotes the \n character is not interpreted as newline, just as a sequence of two characters - \ and n.&lt;br /&gt;Would you initialize your strings with single quotes or double quotes? - Since the data inside the single-quoted string is not parsed for variable substitution, it’s always a better idea speed-wise to initialize a string with single quotes, unless you specifically need variable substitution.&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;How come the code &lt;?php print "Contents: $arr[1]"; ?&gt;works, but &lt;?php print "Contents: $arr[1][2]"; ?&gt;doesn’t for two-dimensional array of mine?&lt;/span&gt; - &lt;/em&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="font-family:verdana;color:#333399;"&gt;&lt;em&gt;Any time you have an array with more than one dimension, complex parsing syntax is required. print "Contents: {$arr[1][2]}" would’ve worked.&lt;br /&gt;&lt;span style="color:#ff6600;"&gt;What is the difference between characters \023 and \x23? -&lt;/span&gt; &lt;/em&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="font-family:verdana;color:#333399;"&gt;&lt;em&gt;The first one is octal 23, the second is hex 23.&lt;br /&gt;With a heredoc syntax, do I get variable substitution inside the heredoc contents? - Yes.&lt;br /&gt;I want to combine two variables together:&lt;br /&gt;$var1 = 'Welcome to ';&lt;br /&gt;$var2 = 'TechInterviews.com';&lt;br /&gt;What will work faster? Code sample 1:&lt;br /&gt;&lt;br /&gt;$var 3 = $var1.$var2;&lt;br /&gt;Or code sample 2:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;$var3 = "$var1$var2";&lt;br /&gt;Both examples would provide the same result - $var3 equal to "Welcome to TechInterviews.com". However, Code Sample 1 will work significantly faster. Try it out with large sets of data (or via concatenating small sets a million times or so), and you will see that concatenation works significantly faster than variable substitution.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#330099;"&gt;For printing out strings, there are echo, print and printf. Explain the differences. - echo is the most primitive of them, and just outputs the contents following the construct to the screen. print is also a construct (so parentheses are optional when calling it), but it returns TRUE on successful output and FALSE if it was unable to print out the string. However, you can pass multiple parameters to echo, like:&lt;br /&gt;&lt;?php echo 'Welcome ', 'to', ' ', 'TechInterviews!'; ?&gt;and it will output the string "Welcome to TechInterviews!" print does not take multiple parameters. It is also generally argued that echo is faster, but usually the speed advantage is negligible, and might not be there for future versions of PHP. printf is a function, not a construct, and allows such advantages as formatted output, but it’s the slowest way to print out data out of echo, print and printf.&lt;br /&gt;&lt;br /&gt;I am writing an application in PHP that outputs a printable version of driving directions. It contains some long sentences, and I am a neat freak, and would like to make sure that no line exceeds 50 characters. How do I accomplish that with PHP? - On large strings that need to be formatted according to some length specifications, use wordwrap() or chunk_split().&lt;br /&gt;What’s the output of the ucwords function in this example?&lt;br /&gt;$formatted = ucwords("TECHINTERVIEWS IS COLLECTION OF INTERVIEW QUESTIONS");&lt;br /&gt;print $formatted;What will be printed is TECHINTERVIEWS IS COLLECTION OF INTERVIEW QUESTIONS.&lt;br /&gt;ucwords() makes every first letter of every word capital, but it does not lower-case anything else. To avoid this, and get a properly formatted string, it’s worth using strtolower() first.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;What’s the difference between htmlentities() and htmlspecialchars()?&lt;/span&gt; - htmlspecialchars only takes care of &lt;, &gt;, single quote ‘, double quote " and ampersand. htmlentities translates all occurrences of character sequences that have different meaning in HTML.&lt;br /&gt;What’s the difference between md5(), crc32() and sha1() crypto on PHP? - The major difference is the length of the hash generated. CRC32 is, evidently, 32 bits, while sha1() returns a 128 bit value, and md5() returns a 160 bit value. This is important when avoiding collisions.&lt;br /&gt;So if md5() generates the most secure hash, why would you ever use the less secure crc32() and sha1()? - Crypto usage in PHP is simple, but that doesn’t mean it’s free. First off, depending on the data that you’re encrypting, you might have reasons to store a 32-bit value in the database instead of the 160-bit value to save on space. Second, the more secure the crypto is, the longer is the computation time to deliver the hash value. A high volume site might be significantly slowed down, if frequent md5() generation is required.&lt;br /&gt;How do you match the character ^ at the beginning of the string? - ^\^&lt;br /&gt;# If the variable $a is equal to 5 and variable $b is equal to character a, what’s the value of $$b? -&lt;br /&gt;100, it’s a reference to existing variable.&lt;br /&gt;# If the variable $a is equal to 5 and variable $b is equal to character a, what’s the value of $$b? -&lt;br /&gt;100, it’s a reference to existing variable.&lt;br /&gt;$$b=$a Where as the value of $a=5;&lt;br /&gt;so the Actual answer is 5.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Presumably if you’re reading in Apache logs, you want to DO something with them using iteration. You can’t easily iterate over a multi-line string… sure, you can explode() the string into an array (but doing so would double memory useI’m actually curious now how to do this so that the read creates a $rbuf_array instead of $rbuf…&lt;br /&gt;Which of the following will not add john to the users array?&lt;br /&gt;&lt;span style="color:#990000;"&gt;2. What’s the difference between sort(), assort() and ksort? Under what circumstances would you use each of these?&lt;br /&gt;3. What would the following code print to the browser? Why?&lt;br /&gt;4. What is the difference between a reference and a regular variable? How do you pass by reference &amp;amp; why would you want to?&lt;br /&gt;5. What functions can you use to add library code to the currently running script?&lt;br /&gt;6. What is the difference between foo() &amp;amp; @foo()?&lt;br /&gt;7. How do you debug a PHP application?&lt;br /&gt;8. What does === do? What’s an example of something that will give true for ‘==’, but not ‘===’?&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#006600;"&gt;9. How would you declare a class named “myclass” with no methods or properties?&lt;br /&gt;10. How would you create an object, which is an instance of “myclass”?&lt;br /&gt;11. How do you access and set properties of a class from within the class?&lt;br /&gt;12. What is the difference between include &amp;amp; include_once? include &amp;amp; require?&lt;br /&gt;13. What function would you use to redirect the browser to a new page?&lt;br /&gt;14. What function can you use to open a file for reading and writing?&lt;br /&gt;15. What’s the difference between mysql_fetch_row() and mysql_fetch_array()?&lt;br /&gt;16. What does the following code do? Explain what’s going on there.&lt;br /&gt;17. Given a line of text $string, how would you write a regular expression to strip all the HTML tags from it?&lt;br /&gt;18. What’s the difference between the way PHP and Perl distinguish between arrays and hashes?&lt;br /&gt;&lt;br /&gt;19. How can you get round the stateless nature of HTTP using PHP?&lt;br /&gt;20. What does the GD library do?&lt;br /&gt;21. Name a few ways to output (print) a block of HTML code in PHP?&lt;br /&gt;22. Is PHP better than Perl? – Discuss. &lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://time.uvr1.com"&gt;time management&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.uvr1.com/BeautifulQuotes/"&gt;Beautitiful quotes&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://ebeslove.googlepages.com/"&gt;tips on pearl&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://replyindia.googlepages.com/paid_survey"&gt;paid_survey&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://replyindia.googlepages.com/earnmoneyonnet"&gt;How to earn money&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.tvlive.we.bs"&gt;Television TV&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6027565613860287103-7480701082187319449?l=phpgreat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpgreat.blogspot.com/feeds/7480701082187319449/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6027565613860287103&amp;postID=7480701082187319449' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6027565613860287103/posts/default/7480701082187319449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6027565613860287103/posts/default/7480701082187319449'/><link rel='alternate' type='text/html' href='http://phpgreat.blogspot.com/2008/04/php-interview-questions-download-php.html' title='PHP MYSQL  Best OSS, lets Know it!!!'/><author><name>web Scientist</name><uri>http://www.blogger.com/profile/15599908111812889832</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry></feed>
