<?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:blogger='http://schemas.google.com/blogger/2008' 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-9096903352259657395</id><updated>2024-10-24T14:51:01.865+05:30</updated><category term="How To ?"/><category term="PHP"/><title type='text'>Connected Computer</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://singhmayank776.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9096903352259657395/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://singhmayank776.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09094747098599435124</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-9096903352259657395.post-5810995630857033279</id><published>2015-04-11T23:14:00.000+05:30</published><updated>2016-02-05T14:30:42.773+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="How To ?"/><title type='text'>How To Make Pendrive Bootable Using Cmd</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;Step 1:&amp;nbsp;&lt;/b&gt;&amp;nbsp;&amp;nbsp;Run &lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;cmd&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Step 2:&lt;/b&gt;&amp;nbsp; &amp;nbsp;Type &lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;diskpart&lt;/span&gt; &lt;/b&gt;&amp;amp; hit Enter&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Step 3: &amp;nbsp;&lt;/b&gt;&amp;nbsp;Type&amp;nbsp;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;list disk&lt;/span&gt;&lt;/b&gt;&amp;nbsp;&amp;amp; hit Enter&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Step 4: &amp;nbsp;&amp;nbsp;&lt;/b&gt;Type&amp;nbsp;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;select disk 1&lt;/span&gt;&lt;/b&gt;&amp;nbsp;(if there are more than one pd connected, select disk by showing pd size ) &amp;amp; hit Enter&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Step 5:&amp;nbsp;&lt;/b&gt;&amp;nbsp; Type &lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;c&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;lean&lt;/span&gt;&lt;/b&gt;&amp;nbsp;&amp;amp; hit Enter&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Step 6: &amp;nbsp;&amp;nbsp;&lt;/b&gt;Type&amp;nbsp;&lt;span style=&quot;font-size: large; font-weight: bold;&quot;&gt;create partition primary &lt;/span&gt;&amp;amp; hit Enter&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Step 7: &amp;nbsp;&amp;nbsp;&lt;/b&gt;Type&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;select partition 1&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&amp;amp; hit Enter&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Step 8: &amp;nbsp;&amp;nbsp;&lt;/b&gt;Type&amp;nbsp;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;active&lt;/span&gt; &lt;/b&gt;&amp;amp; hit Enter&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Step 9: &amp;nbsp;&amp;nbsp;&lt;/b&gt;Type&amp;nbsp;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;format fs=ntfs&lt;/span&gt;&lt;/b&gt; &amp;amp; hit Enter&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Step 10:&amp;nbsp;&lt;/b&gt;Type&amp;nbsp;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;assign&lt;/span&gt;&lt;/b&gt; &amp;amp; hit Enter &amp;amp; then Type &lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Exit&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
After above steps, you can Copy the Windows file and Paste into Pendrive.&lt;/div&gt;
&lt;div&gt;
Before Installation check Boot Order in Boot Menu. (USB drive must be on Top)&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://singhmayank776.blogspot.com/feeds/5810995630857033279/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9096903352259657395/5810995630857033279' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9096903352259657395/posts/default/5810995630857033279'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9096903352259657395/posts/default/5810995630857033279'/><link rel='alternate' type='text/html' href='http://singhmayank776.blogspot.com/2015/04/how-to-make-pendrive-bootable-using-cmd.html' title='How To Make Pendrive Bootable Using Cmd'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09094747098599435124</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9096903352259657395.post-7521907467039916133</id><published>2014-07-14T01:20:00.002+05:30</published><updated>2016-02-05T14:30:42.775+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>150+ PHP Interview Questions &amp; Answers</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1. What is PHP?&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b style=&quot;text-indent: -0.25in;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Answer 1:&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;PHP&lt;/b&gt;: Hypertext Preprocessor is open source server-side scripting language that is widely used for web development. PHP scripts are&lt;b&gt; &lt;/b&gt;executed on the server. PHP allows writing dynamically generated web pages efficiently and quickly. The syntax is mostly borrowed from C, Java and Perl. PHP is free to download and use.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit;&quot;&gt;Answer 2:&amp;nbsp;PHP &lt;/b&gt;(Hypertext&amp;nbsp;Preprocessor) is a scripting language commonly used for web applications. PHP can&amp;nbsp;be easily embedded in HTML. PHP generally runs on a web server. It is available for free and can be used across a variety of servers, operating systems and platforms.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer&lt;/b&gt; &lt;b&gt;3:&lt;/b&gt; The PHP Hypertext Preprocessor is a programming language that allows web developers to create dynamic content that interacts with databases. PHP is basically used for developing web based software applications.&lt;br /&gt;
&lt;div style=&quot;text-indent: 0px;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-indent: 0px;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;2. What is PEAR in php?&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer l:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
PEAR is the next revolution in PHP. This repository is bringing higher level programming to PHP. PEAR is a framework and distribution system for reusable PHP components. It eases installation by bringing an automated wizard, and packing the strength and experience of PHP users into a nicely organized OOP library.&amp;nbsp; PEAR also provides a command-line interface that can be used to automatically install “packages&quot;.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer2:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
PEAR is short for &quot;PHP Extension and Application Repository” and is pronounced just like the fruit. The purpose of PEAR is to provide: A structured library of open-sourced code for PHP users&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
A system for code distribution and package maintenance&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
A standard style for code written in PHP,&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
The PHP Foundation Classes (PFC),&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
The PHP Extension Community Library (PECL),&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
A web site, mailing lists and download mirrors to support the PHP/PEAR community&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
PEAR is a community-driven project with the PEAR Group as the governing body. The project has been founded by Stig S. Bakken in 1999 and quite a lot of people have joined the project since then.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 3&lt;/b&gt;: PEAR (PHP Extension and Application Repository) is a framework and repository for reusable PHP components. PEAR is a code repository containing all kinds of php code snippets and libraries.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
PEAR also offers a command-line interface that can be used to automatically install &quot;packages&quot;.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;3. Explain how to submit form without a submit button?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 1:&lt;/b&gt; We can achieve the above task by using JavaScript code linked to an event trigger of any form field and call the document.form.submit() function in JavaScript code.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
A form data can be posted or submitted without the button in the following ways:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
1. On OnClick event of a label in the form, a JavaScript function can be called to submit the form e.g. document.form_name.submit ()&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
2. Using a Hyperlink: On clicking the link, JavaScript function can be called e.g &lt;a .href=&quot;”&quot; document.myform.submit=&quot;&quot; href=&quot;https://www.blogger.com/null&quot; javascript:=&quot;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
A form can be submitted in various ways without using submit button.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Submitting a form by clicking a link&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Submitting a form by selecting an option from drop down box with the invocation of onChangeEvent&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Using java script: document.form.submit ();&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Using header (“location:page.php”);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 2: &lt;/b&gt;If you don&#39;t want to use the Submit button to submit a form, you can use normal hyperlinks to submit a form. But you need to use some JavaScript code in the URL of the link. For example:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=9096903352259657395&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;a document.myform.submit=&quot;&quot; href=&quot;https://www.blogger.com/%E2%80%9Djavascript:&quot;&gt;Submit Me&lt;/a&gt;.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 3:&lt;/b&gt; We can use a simple JavaScript code linked to an event trigger of any form field. In the JavaScript code, we can call the document.form.submit () function to submit the form. For example: &lt;input nbsp=&quot;&quot; onclick=&quot;document.form.submit
()&quot; type=&quot;button&quot; value=&quot;”save&quot; /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 4:&lt;/b&gt; Trigger the JavaScript code on any event (like onSelect of drop-down list box, on focus, etc.)&amp;nbsp; document.myform.submit (); this will submit the form.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;4. Echo vs. print statement?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;echo()&lt;/b&gt; and &lt;b&gt;print() &lt;/b&gt;are language constructs in PHP, both are used to output strings. The speed of both statements is almost the same.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
echo() can take multiple expressions whereas print cannot take multiple expressions.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Print return true or false based on success or failure whereas echo doesn&#39;t return true or false.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 5.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;$message vs. $$message in PHP?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 1:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$message is a simple variable whereas $$message is a reference variable.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Example: $user = &#39;bob&#39; is equivalent to&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$holder = &#39;user&quot;,&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$$holder = &#39;bob&quot;;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Anwser2: &lt;/b&gt;They are both variables.&amp;nbsp; But $message is a variable with a fixed name.&amp;nbsp; $$message is a variable who’s name is stored in $message. For example, if $message contains &quot;var&quot;, $$message is the same as $var.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 3&lt;/b&gt;:&lt;b&gt; $message&lt;/b&gt; is a variable with a fixed name. &lt;b&gt;$$message&lt;/b&gt; is a variable whose name is stored in $message. If $message contains &quot;var&quot;, $$message is the same as $var.&lt;b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;6.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;Explain the different types of errors in PHP.&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 1&lt;/b&gt;: Notices, Warnings, and Fatal errors are the types of errors in PHP&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Notices&lt;/b&gt;: Notices represents non-critical errors, i.e. accessing a variable that has not yet been defined. By default, such errors are not displayed to the user at all but whenever required, you can change this default behavior.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Warnings&lt;/b&gt;: Warnings are more serious errors but they do not result in script termination. i.e calling include() a file which does not exist. By default, these errors are displayed to the user.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Fatal errors: &lt;/b&gt;Fatal errors are critical errors i.e. calling a non-existent function or class. These errors cause the immediate termination of the script.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Different types of errors are:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;E_ERROR&lt;/b&gt;: A fatal error that causes script termination&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;E_WARNING&lt;/b&gt;: Run-time warning that does not cause script termination&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;E_PARSE&lt;/b&gt;: Compile-time parse error.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;E_NOTICE&lt;/b&gt;: Run-time notice caused due to error in code&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;E_CORE_ERROR&lt;/b&gt;: Fatal errors that occur during PHP&#39;s initial startup (installation)&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;E_CORE_WARNING:&lt;/b&gt; Warnings that occur during PHP&#39;s initial startup&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;E_COMPILE_ERROR&lt;/b&gt;: Fatal compile-time errors indication problem with script.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;E_USER_ERROR&lt;/b&gt;: User-generated error message.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;E_USER_WARNING&lt;/b&gt;: User-generated warning message.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;E_USER_NOTICE&lt;/b&gt;: User-generated notice message.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;E_STRICT&lt;/b&gt;: Run-time notices.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;E_RECOVERABLE_ERROR&lt;/b&gt;: Catchable fatal error indicating a dangerous error&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;E_ALL&lt;/b&gt;: Catches all errors and warnings&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 2: &lt;/b&gt;Here are three basic types of runtime errors in PHP:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;1. Notices:&lt;/b&gt;&amp;nbsp; These&amp;nbsp; are trivial,&amp;nbsp; non-critical&amp;nbsp;&amp;nbsp; errors&amp;nbsp; that&amp;nbsp; PHP&amp;nbsp; encounters&amp;nbsp; while&amp;nbsp; executing&amp;nbsp; a script&amp;nbsp; - for example,&amp;nbsp; accessing&amp;nbsp; a variable&amp;nbsp; that&amp;nbsp; has not&amp;nbsp; yet been&amp;nbsp; defined.&amp;nbsp; By default, such errors are not displayed to the user at all - although you can change this default behavior.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;2.&amp;nbsp; Warnings&lt;/b&gt;:&amp;nbsp; These are more serious errors - for example, attempting to include() a file which&amp;nbsp; does not exist. By default, these errors are displayed to the user, but they do not result in script termination.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;3.&amp;nbsp; Fatal errors&lt;/b&gt;:&amp;nbsp; These are critical errors - for example, instantiating an object of a non-existent&amp;nbsp;&amp;nbsp; class, or calling a non-existent function. These errors cause the immediate termination of the script, and PHP&#39;s default behavior is to display them to the user when they take place.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Internally, these variations are represented by twelve different error types&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;7.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;Explain the importance of the function htmlentities.&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 1&lt;/b&gt;: The htmlentities() function converts characters to HTML entities.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 2:&lt;/b&gt; htmlentities() - Convert all applicable characters to HTML entities&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
This function is identical to htmlspecialchars()&amp;nbsp;&amp;nbsp; in all ways, except with htmlentities(), all characters which have HTML character entity equivalents are translated&amp;nbsp; into these entities&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;8.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;What is MIME?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer1: MIME&lt;/b&gt; - Multi-purpose Internet Mail Extensions.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;MIME&lt;/b&gt; types represents a standard way of classifying file types over Internet.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Web servers and browsers have a list of MIME types, which facilitates files transfer of the same type in the same way, irrespective of operating system they are working in.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
A MIME type has two parts: a &lt;b&gt;type&lt;/b&gt; and a &lt;b&gt;subtype&lt;/b&gt;. They are separated by a slash (/).&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
MIME type for Microsoft Word files is application and the subtype is msword, i.e. application/msword.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 2:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
MIME is Multipurpose Internet Mail Extensions is an Internet standard for the format of e-mail.&amp;nbsp; However browsers also uses MIME standard to transmit files. MIME has a header which is added to a beginning of the data. When browser sees such a header it shows the data as it would be a file (for example image)&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Some examples of MIME types:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
audio/x-ms-wmp&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
image/png&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
application/x-shockwave-flash&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 3:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Multipurpose Internet Mail Extensions.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
WWW&#39;s ability to recognize and handle files of different types is largely dependent on the use of the MIME (Multipurpose Internet Mail Extensions) standard. The standard provides for a system of registration of file types with information about the applications needed to process them. This information is incorporated into Web server and browser software, and enables the automatic recognition and display of registered file types.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 9.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;What is a Session in PHP?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 1:&lt;/b&gt; A PHP session is no different from a normal session. It can be used to store information on the server for future use. However this storage is temporary and is flushed out when the site is closed. Sessions can start by first creating a session id (unique) for each user.&lt;b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Syntax&lt;/b&gt;: session_start()&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;E.g.&lt;/b&gt; storing a customer’s information.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Sessions allow data to be transferred from one page to another. Session information is temporary and information is valid until the user is using the website. A session assigns a unique ID, UID, to each visitor.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
A PHP session starts using:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;PHP Session Variables&lt;/b&gt;:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
A PHP session variable is used to hold values of the current session. A session needs to be started first.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
session_start();&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
// store session data&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$_SESSION[&#39;sample&#39;]=1;?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
They can be used to hold information about a single user that is applicable to all web pages.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$message is used to store variable data. $$message can be used to store variable of a variable. Data stored in $message is fixed while data stored in $$message can be changed dynamically.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
E.g. $var1 = ‘Variable 1’&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$$var1= ‘variable2’&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
This can be interpreted as $ Variable 1=‘variable2’;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
For me to print value of both variables, I will write&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$var1 $($var1)&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer2:&lt;/b&gt; A session is a logical object created by the PHP engine to allow you to preserve data across subsequent HTTP requests.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
There is only one session object available to your PHP scripts at any time. Data saved to the session by a script can be retrieved by the same script or another script when requested from the same visitor.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&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;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 10.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;How to set cookies in PHP?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 1:&lt;/b&gt; A cookie is used for identification purposes. It is more commonly used to identify a user in a session. It is a small file the application inserts on the user’s computer. With PHP one can create and retrieve the cookie.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;Setting cookie in php:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Cookies in PHP can be set using the setcookie() function. This must appear before the HTML tag.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Syntax:&lt;/b&gt; Setcookie(name, value, expire, path, domain);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Example&lt;/b&gt;: here, the cookie name sample is assigned a value jim. The cookie expires after an hour.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Setcookie(“sample”, “jim”, time()+3600);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;Retrieving cookie value:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
The cookie that is set can be retrieved as shown below:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
echo $_cookie[“user”];&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
isset() function can be used to find if the cookie is set.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 2: &lt;/b&gt;Setcookie(‘variable&#39;,&#39;value&#39;,&#39;time&#39;);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Variable - name of the cookie variable&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Value - value of the cookie variable&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Time - expiry time&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Example:&amp;nbsp; setcookie(&#39;Test&#39;,$i,time()+3600);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Test - cookie variable name&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$i - value of the variable ‘Test’&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Time()+3600 - denotes that the cookie will expire after an one hour.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;11.&lt;span style=&quot;font-style: normal; font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;b&gt;What is a Persistent Cookie?&lt;i&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 1:&lt;/b&gt; Cookies are used to remember the users. Content of a Persistent cookie remains unchanged even when the browser is closed. ‘Remember me’ generally used for login is the best example for Persistent Cookie.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 2: &lt;/b&gt;A persistent cookie is a cookie which is stored in a cookie file permanently&amp;nbsp;&amp;nbsp; on the browser’s computer. By default, cookies are created as temporary cookies which stored only in the browser’s memory.&amp;nbsp; When the browser is closed, temporary cookies will be erased. You should decide when to use temporary cookies and when to use persistent cookies based on their differences:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Temporary cookies cannot be used for tracking long-term information.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Persistent cookies can be used for tracking long-term information.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Temporary cookies are safer b/c no programs other than the browser can access them.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Persistent cookies are less secure b/c users can open cookie files see the cookie values.&lt;b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 12.&amp;nbsp;&lt;/i&gt;&lt;b&gt;How to reset/destroy a cookie?&lt;/b&gt;&lt;i&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 1&lt;/b&gt;: Cookies can be deleted either by the client or by the server. Clients can easily delete the cookies by locating the Cookies folder on their system and deleting them. The Server can delete the cookies in two ways:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Reset a cookie by specifying expiry time&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Reset a cookie by specifying its name only&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
The function setcookie() is used to define a cookie that is to be sent along with HTTP headers. The cookie must be sent prior to any output from the script as is the protocol restriction. After setting the cookies, they can be used when the next page is loaded by using &lt;b&gt;$_COOKIE&lt;/b&gt; or &lt;b&gt;$HTTP_COOKIE_VARS&lt;/b&gt; arrays.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 2:&lt;/b&gt; Reset a cookie by specifying expire time in the past:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Example:&amp;nbsp; setcookie(&#39;Test&#39;,$i,time()-3600);&amp;nbsp;&amp;nbsp;&amp;nbsp; //already&amp;nbsp; expired&amp;nbsp; time&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Reset a cookie by specifying its name only&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Example:&amp;nbsp; setcookie(&#39;Test&#39;);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 13.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;Explain the differences between require and include, include_once?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 1: include()&lt;/b&gt; will include the file specified.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;include_once()&lt;/b&gt; will include the file only once even if the code of the file has been included before.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;require()&lt;/b&gt; and include() are the same with respect to handling failures. However, require() results in a fatal error and does not allow the processing of the page. i.e. include will allow the script to continue.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 2:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
require_once()&amp;nbsp; and include_ once()&amp;nbsp; are both the functions to include and evaluate the specified&amp;nbsp; file only once. If the specified file is included previous to the present call occurrence, it will not be done again.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
But require() and include() will do it as many times they are asked to do.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 3:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
The include_once() statement includes and evaluates the specified file during the execution&amp;nbsp; of the script. This is a behavior similar to the include() statement, with the only difference being that if the code from a file has already been included,&amp;nbsp; it will not be included&amp;nbsp; again.&amp;nbsp; The major difference between include() and require() is that in failure include() produces a warning message whereas require() produces&amp;nbsp; a fatal errors.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 4:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
All three are used to an include file into the current page.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
If the file is not present, require(),&amp;nbsp; calls a fatal error, while&amp;nbsp; in include()&amp;nbsp; does not-&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
the include_ once() statement&amp;nbsp; includes and evaluates the specified&amp;nbsp; file during the execution of the script. This is a behavior similar to the inc1ude() statement, with the only difference being, that if the code from a file has already been included, it will not be included&amp;nbsp; again, It does not call a fatal error if file not exists. require_once() does the same as include _once(), but it calls a fatal error if file not exists.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Note:&lt;/b&gt; File will not be included more than once. If we want to include a file once only and further calling of the file will be ignored.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;14.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;What is the difference between include and require in PHP?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 1: include ()&lt;/b&gt; and &lt;b&gt;require ()&lt;/b&gt; are almost similar except the way they handle failures. include () produces a warning and require() produces a fatal error. To halt processing of the page, use require (). The same operation will not halt by using include (). It should be ensured that the include_path settings are proper. Both are used for inserting the file content into PHP file prior to its execution by the server.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 2&lt;/b&gt;: It’s how they 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;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 15.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;What is urlencode and urldecode?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 1: Urlencode&lt;/b&gt; can be used to encode a string that can be used in a URL. It encodes the same way posted data from web page is encoded. It returns the encoded string.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Syntax&lt;/b&gt;: urlencode (string $str)&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Urldecode&lt;/b&gt; can be used to decode a string. Decodes any %## encoding in the given string (Inserted by urlencode)&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Syntax&lt;/b&gt;: urldecode (string $str)&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 2:&lt;/b&gt; &lt;b&gt;Urlencode()&lt;/b&gt; returns the URL encoded version of the given string. URL coding converts special characters into % signs followed by two hex digits. For example:&lt;b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;urlencode&lt;/b&gt;(&quot;l0.00%&quot;) will return “10%2E00%25 &#39;&#39;. URL encoded strings are safe to be used as part of URLs. urldecodeO returns&amp;nbsp; the URL decoded version of the given string.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 3:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;string urlencode(str&lt;/b&gt;) - Returns the URL encoded version of the input string. String values to be used in URL query string need to be URL encoded. In the URL encoded version:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Alphanumeric characters are maintained as is. Space characters are converted to &quot;+&quot; characters.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Other non-alphanumeric characters are converted “%” followed by two hex digits representing the converted character.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;string urldecode(str)&lt;/b&gt; - Returns the original string of the input URL encoded string.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
For example:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$discount =&quot;10.00%&quot;;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$url = &quot;http://domain.com/submit.php?disc=&quot;.urlencode($discount);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
echo $url;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
You will get &#39;&#39;http://domain.com/submit.php?disc=10%2E00%25&#39;&#39;.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 16.&lt;/b&gt;&amp;nbsp;&lt;b&gt;What are the functions for IMAP?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
IMAP is used for communicate with mail servers. It has a number of functions. Few of them are listed below:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Imap_alerts – Returns all the imap errors occurred&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Imap_body – Reads the message body&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Imap_check – Reads the current mail box&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Imap_clearflag_full – Clears all flags&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Imap_close – close and IMAP stream&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Imap_delete – Delete message from current mailbox&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Imap_delete_mailbox – Deletes a mailbox&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Imap_fetchbody – Fetches body of message&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Imap_fetchheader – Fetches header of message&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Imap_headers – Returns headers for ALL messages&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Imap_mail : send a mail&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Imap_sort- Sorts IMAP messages&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; imap_open: To open an IMAP stream to a mail box&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; imap_open: To open an IMAP stream to a mail box&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; imap_expunge: Delete all emails marked for deletion.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 17.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;How can we increase the execution time of a php script?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 1:&lt;/b&gt; Default time allowed for the PHP scripts to execute is 30s defined in the php.ini file. The function used is set_time_limit(int seconds). If the value passed is ‘0’, it takes unlimited time. It should be noted that if the default timer is set to 30 sec and 20 sec is specified in set_time_limit(), the script will run for 45 secs.&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
The script execution time can be increased by&lt;br /&gt;
- Using sleep() function in PHP script&lt;br /&gt;
- Using set_time_limit() function&lt;br /&gt;
- The default limit is 30 seconds. The time limit can be set to zero to impose no time limit to pause.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 2:&lt;/b&gt; By the use of void set_time_limit(int seconds)&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Set the number of seconds a script is allowed to run.&amp;nbsp; If this is reached, the script returns a fatal error. The default limit is 30 seconds or, if it exists, the max_execution_time value defined in the php.ini. If seconds is set to zero, no time limit is imposed.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
When called, set_time_limit() restarts the timeout counter from zero. In other words, if the timeout is the default 30 seconds, and 25 seconds into script execution a call such as set_time_limit(20) is made, the script will run for a total of 45 seconds before timing out.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 18.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;What is Type juggle in php?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Type Juggling means dealing with a variable type. In PHP a variables type is determined by the context in which it is used. If an integer value is assigned to a variable, it becomes an integer.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
E.g. $var3= $var1 + $var2&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Here, if $var1 is an integer. $var2 and $var3 will also be treated as integers.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 19.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;What is the difference between mysql_fetch_object and mysql_fetch_array?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 1:&lt;/b&gt; Ways to retrieve the data in the result set of MySQL using PHP&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
1. &lt;b&gt;mysql_fetch_row&lt;/b&gt;($result):- where $result is the result resource returned from a successful query executed using the mysql_query() function.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Example&lt;/b&gt;:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$result = mysql_query(“SELECT * from students);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
while($row = mysql_fetch_row($result))&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
{&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Some statement;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
}&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
2. &lt;b&gt;mysql_fetch_array&lt;/b&gt;($result):- Return the current row with both associative and numeric indexes where each column can either be accessed by 0, 1, 2, etc., or the column name.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Example&lt;/b&gt;:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$row = mysql_fetch_array($result)&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
3. &lt;b&gt;mysql_fetch_assoc&lt;/b&gt;($result): Return the current row as an associative array, where the name of each column is a key in the array.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Example&lt;/b&gt;:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$row = mysql_fetch_assoc($result)&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$row[‘column_name’]&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;4.mysql_fetch_object&lt;/b&gt;: Results are objects returned from database. Fields are accessible like&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$result-&amp;gt;name, $result-&amp;gt;cust_name, where $result is the result object and name, cust_name are the fields.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;mysql_fetch_array&lt;/b&gt; : Results are arrays returned from database. Fields are accessible like $result[name], $result[cust_name].&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 2: &lt;/b&gt;MySQL fetch object will collect first single matching record where mysql_ fetch _array will collect all matching records from the table in an array.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 3:&lt;/b&gt; mysql_fetch_array() -&amp;gt; Fetch a result row as a combination of associative array and regular array. mysql_fetch_object() -&amp;gt; Fetch a result row as an object.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
mysql_fetch_row() -&amp;gt; Fetch a result set as a regular array().&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 4: &lt;/b&gt;The difference between mysql_fetch_row() and mysql_fetch_array() is that the first returns the results in a numeric array ($row[0], $row[1], etc.), while the latter returns the results an array containing both numeric&amp;nbsp; and associative keys ($row[&#39;name&#39;], $row[&#39;email&#39;], etc)&lt;b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
mysql_fetch_object() returns an object ($row-&amp;gt;name,$row-&amp;gt;email,&amp;nbsp;&amp;nbsp; etc.).&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 20.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;What is the difference between the functions unlink and unset?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 1: &lt;/b&gt;Unlink is a function for file system handling which deletes a file. Unset is used to destroy a variable.&amp;nbsp;&amp;nbsp; &lt;b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
The function unlink() is to remove a file, whereas unset() is used for destroying a variable that was declared earlier. unset() empties a variable or contents of file.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 2: Unlink()&lt;/b&gt;&amp;nbsp; is a function&amp;nbsp; for file system handling.&amp;nbsp; It will simply delete the file in context&lt;b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Unset()&lt;/b&gt; &amp;nbsp;is a function&amp;nbsp; for variable&amp;nbsp; management.&amp;nbsp; It will make a variable undefined&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 21.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;What is Joomla in PHP?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Joomla is a content management system. Powerful online applications and web sites are build using Joomla. Joomla is an open source CMS tool. Clients can easily manage their web sites with minimal amount of instructions. It is highly extensible. Joomla runs off PHP or MySQL. Joomla is used to create, maintain a structured, flexible portal, add or edit content, changes the look and feel of the site. PHP scripting is used and persisted most of its data / information in MySQL database.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; 22.&amp;nbsp;&lt;b&gt;What is Zend engine?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Zend Engine is used internally by PHP as a complier and runtime engine. PHP Scripts are loaded into memory and compiled into Zend opcodes.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://3.bp.blogspot.com/-mcZtaq5ZDX8/Vp4pKIj4lhI/AAAAAAAAAzE/KCkWrALRsHU/s1600/zend.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;292&quot; src=&quot;http://3.bp.blogspot.com/-mcZtaq5ZDX8/Vp4pKIj4lhI/AAAAAAAAAzE/KCkWrALRsHU/s320/zend.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 23.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;Explain the architecture of Zend engine with the diagram.&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Zend Engine is used internally by PHP as a compiler and runtime engine. PHP Scripts are loaded into memory and compiled into Zend opcodes. These opcodes are executed and the HTML generated is sent to the client. The same is depicted below&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Zend engine is like a virtual machine and is an open source, and is known for its role in automating the web using PHP. Zend is named after its developers Zeev and Aandi. Its reliability, performance and extensibility has a significant role in increasing the PHP’s popularity. The Zend Engine II is the heart of PHP 5. It is an open source project and freely available under BSD style license.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 24.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;What is the difference between Split and Explode?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Both the functions are used to Split a string. However, Split is used to split a string using a regular expression. On the other hand, Explode is used to split a string using another string.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
E.g explode (&quot; this&quot;, &quot;this is a string&quot;); will return “Is a string”&lt;br /&gt;
Split (&quot; + &quot;, &quot;This+ is a string&quot;)&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 25.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;What is CAPTCHA?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
CAPTCHA is a test to determine if the user using the system (usually a web form) is a human. It identifies this by throwing challenges to users. Depending on the responses the identification can be made. E,g Answering to identification of distorted images. Captcha Creator is a PHP Script that generates Strong Captchas&lt;b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 26.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;What is difference between developing website using Java and PHP?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
In order to make interactive pages, java uses JSP (Java Server pages). PHP is open source while JSP is not. Libraries are much stronger in Java as compared tp PHP. Huge codes can be managed with ease in Java by making classes.&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Both technologies are used for dynamic websites development.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
PHP is an interpreter based technology where as java is compiler based(usually JSP).&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
PHP is open source where as JSP is not.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Web sites developed in PHP are much more faster compared to Java technology&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Java is a distributed technology, which means N tier application can be developed, where as PHP is used only for web development.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 27.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;How can I embed a java program in php file and what changes have to be done in php.ini file?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
There are two possible ways to bridge PHP and Java: you can either integrate PHP info a Java Servlet environment, which is the more stable and efficient solution, or integrate Java support into PHP. The former is provided by a SAPI module that interfaces with the Servlet server, the latter by this Java extension&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
The Java extension provides a simple and effective means for creating and invoking methods on Java objects from PHP. The JVM is created using JNI, and everything runs in-process.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Example Code:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
getProperty(‘java.version&#39;). &quot;;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;echo &#39;Java vendor=‘. $system-&amp;gt;getProperty(‘java.vendor&#39;). &quot;;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
echo &#39;OS=&#39; . $system-&amp;gt;getProperty(&#39;os.name&#39;). ‘&amp;nbsp;&amp;nbsp; ‘. $system-&amp;gt;getProperty(&#39;os.version&#39;) . ‘on &#39; . $system-&amp;gt;getProperty(‘os.arch&#39;) . &#39;&amp;nbsp; &#39;; // java.util.Date example&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$formatter = new Java(&#39;java.text.SimpleDateFormat&#39;,.&quot;EEEE, MMMM dd, yyyy &#39;at&#39; h.mm.ss a zzzz&quot;); echo $formatter-&amp;gt;format(new Java(‘java.util.Date&#39;));&amp;nbsp;&amp;nbsp; ?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
The behavior of these functions is affected by settings in php.ini.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Table 1. Java configuration options&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Name&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Default&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Changeable&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
java.class.path&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
NULL&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
PHP_INI_ALL&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Name Default Changeable&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
java.home&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
NULL&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
PHP_INI_ALL&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
java.library.path&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
NULL&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
PHP_INI_ALL&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
java.library.path&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
JAVALIB&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
PHP_INI_ALL&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 2: PH&lt;/b&gt;P can be integrated into the servlet environment of java or java support can be integrated with php. The java extension can be used to create and invoke methods on Java objects from PHP.&lt;b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 28.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;How do you create sub domains using PHP?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Wild card domains can be used. Sub domains can be created by first creating a sub directory in the /htdocs folder. E.g. /htdocs/mydomain. Then, the host file needs to be modified to define the sub domain. If the sub domains are not configured explicitly, all requests should be thrown to the main domain.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 29.&lt;/b&gt;&amp;nbsp;&lt;b&gt;How to upload files using PHP?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Files can be uploaded in PHP by using the tag type=”file”. An upload form must have encytype=&quot;multipart/form-data&quot; , method also needs to be set to method=&quot;post&quot;. Also, hidden input MAX_FILE_SIZE before the file input. To restrict the size of files&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;E.g.&amp;nbsp;&lt;/b&gt;method=&quot;POST&quot;&amp;gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;input name=&quot;MAX_FILE_SIZE&quot; type=&quot;hidden&quot; value=&quot;1000&quot; /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;30.&lt;/b&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;What is the difference between using copy() and move() function in php file uploading?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Copy() makes a copy of the file. It returns TRUE on success. It can copy from any source to destination. Move simple Moves the file to destination if the file is valid. While move can move the uploaded file from temp server location to any destination on the server. If filename is a valid upload file, but cannot be moved for some reason, no action will occur.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
- Select a file from the form using&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
- Specify the path into which the file is to be stored.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
- Insert the following code in php script to upload the file.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
move_uploaded_file($_FILES[&quot;file&quot;][&quot;tmp_name&quot;], &quot;myfolder/&quot; . $_FILES[&quot;file&quot;][&quot;name&quot;]);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b style=&quot;text-indent: -0.25in;&quot;&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;text-indent: -0.25in;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 31.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;text-indent: -0.25in;&quot;&gt;What is the difference between Notify URL and Return URL?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Notify URL and Return URL is used in Paypal Payment Gateway integration. Notify URL is used by PayPal to post information about the transaction. Return URL issued by the browser; A url where the user needs to be redirected on completion of the payment process.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 32.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;Describe functions STRSTR() and STRISTR().&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 1:&lt;/b&gt; &lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Both the functions are used to find the first occurrence of a string. Parameters includes: input String, string whose occurrence needs to be found, TRUE or FALSE (If TRUE, the functions return the string before the first occurrence.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
STRISTR is similar to STRSTR. However, it is case-insensitive&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
E.g. strstr ($input_string, string)&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 2:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;string strstr&lt;/b&gt; ( string haystack, string needle) returns part of haystack string from the first occurrence of needle to the end of haystack. This function is case-sensitive.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Strstr()&lt;/b&gt; returns part of a given string from the first occurrence of a given substring to the end of the string. For example:&amp;nbsp; strstr(&quot;user@example.com&quot;,&quot;@”) will return “@example.com&quot;.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit;&quot;&gt;stristr()&lt;/b&gt; is&amp;nbsp;identical&amp;nbsp;to strstr() except that it is case insensitive.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 33.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;What are the various methods to pass data from one web page to another web page?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Different methods to pass data from one web page to another:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
1. Store the data in a session variable. By storing the data, the data can be passed from one page to another.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
2. Store data in a cookie: By storing data in a persistent cookie, data can be passed from one form to another.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
3. Set the data in a hidden field and post the data using a submit button.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Short note on passing parameter by reference and returning parameter by reference with examples.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Passing parameter by reference: In PHP, variables can be passed by reference so as to modify them. Variables, statements which have new and references returned from function can be passed.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Example&lt;/b&gt;: references returned from function&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Function &amp;amp;sample()&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
{&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $a =1;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return &amp;amp;a;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
}&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Foo(bar());&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Returning parameter by reference:&lt;/b&gt; Returning parameter by reference is used when a function to find to which variable a reference should be bound.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Example&lt;/b&gt;:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$obj = new foo;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$myValue = &amp;amp;$obj-&amp;gt;getValue(); // $myValue is a reference to $obj-value, which is 42.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$obj-&amp;gt;value = 2;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
echo $myValue;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 34.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;How many ways I can redirect a PHP page?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;a&lt;/b&gt;. Header function in PHP redirects to a new URL&lt;b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Example&lt;/b&gt;:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;header(&quot;Location: http://www.redirecturl.com/&quot;);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;b&lt;/b&gt;. http_redirect() is also used to redirect to a new page or URL.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Syntax&lt;/b&gt;: void http_redirect ( [string url [, array params [, bool session = FALSE [, int status]]]] )&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Here, the URL is the path of the new page. params can be some query parameters followed by whether the session information needs to be passed and the custom response status code.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 35.&lt;/b&gt;&amp;nbsp;&lt;b&gt;Explain the purpose of output buffering in PHP.&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Output buffering in PHP buffers a scripts output. This buffer can be edited before returning it to the client. Without output buffering, PHP sends data to the web server as soon as it is ready. Output buffering &quot;send&quot; cookies at any point in the script. Cookies do not have to be necessarily sent near the start of page. Output buffers are stackable and hence sending to output is by choice.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 36.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;How can we know the number of days between two given dates using PHP?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 1:&lt;/b&gt; The start date and end date can be first found as shown below:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$date1= strotime($start_date);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$date2= strotime($end_date);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$date_diff = (($date1)- ($date2)) / (60*60*24)&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 2&lt;/b&gt;: Simple arithmetic:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$datel = date(&#39;Y-m-d&#39;);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$date2 = &#39;2006-07-01&#39;;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$days = (strtotime() – strtotime())/ (60 * 60 * 24);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
echo &quot;Number&amp;nbsp; of days since &#39;2006-07-01 &#39;: $days&quot;;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 3:&lt;/b&gt; Use DATEDIFF()&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
SELECT DATEDIFF(NOW():’2008-10-01&#39;);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 37.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;How can we encrypt the password using PHP?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
crypt() function is used to create one way encryption. It takes one input string and one optional parameter. The function look is defined as: crypt (input_string, salt), where input_string consists of the string which has to be encrypted and salt is an optional parameter. PHP uses DES for encryption. The format is as follows:-&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$password = crypt(&#39;mypassword&#39;);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print $password . “ is the encrypted version of mypassword”;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; 38.&amp;nbsp;&lt;b&gt;How will you change the name of a column in a table?&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
ALTER TABLE table_name CHANGE old_colm_name new_colm_name&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 39.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;What is the default session time in PHP?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Until closing the browser.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;40.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;How will you create a database using PHP and MySQL?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
By using : mysql_create_db(&quot;Database Name&quot;)&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 41.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;How will you find out the value of current session id? &lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
By using: session_id()&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;\ &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 42.&lt;/b&gt;&amp;nbsp;&lt;b&gt;What is the Difference between Dynamic &amp;amp; Static Web Pages?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
In simplest terms, static Web pages are those with content that cannot change without a developer editing its source code, while dynamic Web pages can display different content from the same source code.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;u&gt;Static Web Pages&lt;/u&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Static Web pages display the exact same information whenever anyone visits it. Static Web pages do not have to be simple plain text. They can feature detailed multimedia design and even videos. However, every visitor to that page will be greeted by the exact same text, multimedia design or video every time he visits the page until you alter that page&#39;s source code.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;u&gt;Dynamic Web Pages&lt;/u&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Dynamic Web pages are capable of producing different content for different visitors from the same source code file. The website can display different content based on what operating system or browser the visitor is using, whether she is using a PC or a mobile device, or even the source that referred the visitor. A dynamic Web page is not necessarily better than a static Web page.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;43.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;What is the difference between == and === in PHP?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
When comparing values in PHP for equality you can use either the == operator or the === operator. What’s the difference between the 2? Well, it’s quite simple. The == operator just checks to see if the left and right values are equal. But, the === operator (note the extra “=”) actually checks to see if the left and right values are equal, and also checks to see if they are of the same variable type (like whether they are both booleans, ints, etc.).&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;44.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;In PHP, what are magic methods and how are they used?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
PHP functions that start with a double underscore – a “__” – are called magic functions (and/or methods) in PHP. They are functions that are always defined inside classes, and are not stand-alone (outside of classes) functions. The magic functions available in PHP are: __construct(), __destruct(), __call(), __callStatic(), __get(), __set(), __isset(), __unset(), __sleep(), __wakeup(), __toString(), __invoke(), __set_state(), __clone(), and __autoload().&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;45.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;What is the difference between self and $this?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$this is used to reference the current object, whereas self is used to access the current class itself.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;46.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;How to delete an element from an array in php?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
When deleting an element from an array in PHP, a good function to use is the unset function. Here is an example of its usage:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;i&gt;An example of using unset to delete an element from an array:&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$anArray = array(&quot;X&quot;, &quot;Y&quot;, &quot;Z&quot;);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
unset($anArray[0]);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
//&#39;dumps&#39; the content of $anArray to the page:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
var_dump($anArray);&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;i&gt;The output of the var_dump function will be:&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
array(2) { [1]=&amp;gt; string(1) &quot;Y&quot; [2]=&amp;gt; string(1) &quot;Z&quot; }&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;47.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;The code to turn off error messages in PHP:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
You have to place this line of code before the code that is causing the warning to be displayed. If you place this code after the offending code, then it will not work in suppressing the error message that gets displayed. Here is the line of code to use:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
error_reporting(E_ERROR | E_PARSE);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;48.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;What are the differences between GET and POST methods in form submitting, give the case where we can use GET and we can use POST methods?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
When&amp;nbsp; we submit&amp;nbsp; a form, which&amp;nbsp; has the GET method&amp;nbsp; it displays&amp;nbsp; pair of name/value&amp;nbsp; used in the form&amp;nbsp; at the address&amp;nbsp; bar of the browser&amp;nbsp; preceded&amp;nbsp; by url. Post method doesn&#39;t display these values.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;49.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;Meaning of Open Source Software.&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
OSS (Open Source Software) is computer s/w with its source code made available &amp;amp; licensed with a license in which the copyright holder provides the rights to study, change &amp;amp; distribute s/w to anyone &amp;amp; for any purpose.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;50.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;How to Download and Install PHP on Windows?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
PHP is one of the most popular languages to develop dynamic Web pages. It supports all major database servers, including:&amp;nbsp; MySQL, MS SQL Server, Oracle, mSQL, Sybase, etc.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
If you&amp;nbsp; are&amp;nbsp; developing&amp;nbsp;&amp;nbsp; a Web&amp;nbsp; application&amp;nbsp;&amp;nbsp; that uses&amp;nbsp; PHP&amp;nbsp; and needs&amp;nbsp; to access&amp;nbsp; MS&amp;nbsp; SQL Server,&amp;nbsp; you&amp;nbsp; should&amp;nbsp; go download&amp;nbsp; and install&amp;nbsp; PHP &amp;nbsp;to your&amp;nbsp; local&amp;nbsp; machine&amp;nbsp; to practice&amp;nbsp; PHP and SQL Server connection.&amp;nbsp; The best way to download and install PHP on Windows systems is to:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Go to http:/www.php.net. Which is the official Web site for PHP.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Click the Downloads menu link. You will see the PHP download page.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Go to the &quot;Windows&amp;nbsp; Binaries&quot;&amp;nbsp; section,&amp;nbsp; and click &quot;PHP 5.2.3 zip package&quot;&amp;nbsp; link to download&amp;nbsp; PHP binary version&amp;nbsp; for Windows&amp;nbsp; in ZIP format&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Save the downloaded file, php-S.2.3-Win32.zip&amp;nbsp;&amp;nbsp; with 9,847,499 bytes, in C: Temp directory.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Unzip the downloaded file info directory C: php.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
You are done. No need to run any installation program.&lt;br /&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;51.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;How to Check Your PHP Installation?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
PHP provides two execution interfaces: Command Line Interlace (CLI) and Common Gateway&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Interface (CGI). If PHP is installed in the php directory on your system, you can try this to check&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
your installation:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Run &quot;phpphp -v&quot; command to check the Command Line Interface (CLI).&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Run &quot;phpphp-cgi -v&quot; command to check the Common Gateway Interface (CGI).&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
If you see PHP printing the version information on your screen for both commands, your installation is ok. Open a command window and run the commands below:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
C:&amp;gt;phpphp -v&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
PHP 5.22 (cli) (built: May 2 2007 19:18:26)&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Copyright (c) 1997-2007 The PHP Group&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Zend Engine v2.2.0 Copyright (c) 1998-2007 Zend Technologies&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
C:&amp;gt;phpphp-cgi -v&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
PHP 5.22 (cgi-fcgi) (built: May 2 2007 19:18:25)&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Copyright (c) 1997-2007 The PHP Group&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Zend Engine v2.2_0 Copyright (c) 1998-2007 Zend Technologies&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;52.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;How To Download and Install PHP for Windows?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
The best way to download and install PHP on Windows systems is to:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Go to http:/www.php.net, which is the official Web site for PHP.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Download PHP binary version&amp;nbsp; for Windows&amp;nbsp; in ZIP format&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Unzip the downloaded file into a directory.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
You are done. No need to run any installation program.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;53.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;Where Are PHP Configuration Settings Stored?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
PHP stores configuration settings in a file called php.ini in PHP home directory. You can open it with any text editor to your settings.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;54.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;How to Run a PHP Script?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
A standard alone PHP script can be executed directly with the PHP Command Line Interface (CLI). Write the following script in a file called hello.php:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
This script can be executed by CLI interface like this phpphp hello.php&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
You should see the &quot;Hello world!&quot; Message printed on your screen.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;55.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;What Are the Special Characters You Need to Escape in Single-Quoted Stings?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
There are two special characters you need to escape in a single-quote string: the single quote (&#39;) &amp;amp; the back slash (\). Here is a PHP script example of single-quoted strings:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
echo &#39;Hello world! &#39;. ,&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
echo &#39;It&#39;s Friday! &#39;;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
echo &#39;Represents an operator.&#39;;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
This script will print:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Hello world! It’s Friday! Represents an operator.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;56.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;Can You Specify the &quot;new line&quot; Character in Single-Quoted Strings?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
You can not specify the &quot;new line&quot; character in a single-quoted string. If you don&#39;t believe, try this script&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
This script will print:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
will not work in single&amp;nbsp; quoted strings.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;57.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;How Many Escape Sequences Are Recognized in Single-Quoted Strings?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
There are 2 escape sequences you can use in single-quoted&amp;nbsp;&amp;nbsp; strings:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; \ - Represents the back slash character.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ‘- Represents the single quote character.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;58.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;What Are the Special Characters You Need to Escape in Double-Quoted Stings?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
There are two special characters you need to escape in a double-quote string: the double quote (&quot;) and the back slash (\).&amp;nbsp; Here is a PHP script example&amp;nbsp;&amp;nbsp; of double-quoted strings:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
echo &quot;Hello world!&quot;;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
echo &quot;Tom said: &quot;Who&#39;s there?””;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
echo &quot; represents an operator. &quot;;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
This script will print:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Hello world! Tom said: &quot;Who&#39;s there?&quot; represents an operator.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;59.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;How Many Escape Sequences Are Recognized in Double-Quoted Strings in PHP?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
There are 12 escape sequences you can use in double-quoted strings:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; \ - Represents the back slash character.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; “- Represents the double quote character.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $ - Represents the dollar sign.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {- Represents the open brace character.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } - Represents the dose brace character.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [- Represents the open bracket character.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ] - Represents the close bracket character.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nn - Represents&amp;nbsp; a character&amp;nbsp; as an octal value,&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xnn - Represents&amp;nbsp; a character&amp;nbsp; as a hex value.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;60.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;How To Include Variables in Double-Quoted Strings in PHP?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Variables included in double-quoted strings will be interpolated. Their values will be concatenated into the enclosing strings.&amp;nbsp; For example, two statements in the following PHP script will print out the same string:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$variable = &quot;and&quot;;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
echo &quot;part 1 $variable part 2 &quot;.,&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
echo &quot;part 1 &quot;.$variable.&quot; part 2”; ?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
This script will print:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
part 1 and part 2 part 1 and part 2&lt;br /&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;61.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;How Many Ways to Include Variables in Double-Quoted Strings in PHP?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
There are 3 formats to include variables in double-quoted strings:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;part 1 $variable&amp;nbsp; part 2&quot; - This is the simplest&amp;nbsp; format&amp;nbsp; to include&amp;nbsp; a variable&amp;nbsp; in a string,&amp;nbsp; The variable&amp;nbsp; name&amp;nbsp; starts with the dollar sign and ends at the first&amp;nbsp; character that cannot be used in variable&amp;nbsp; name,&amp;nbsp; Space is good character&amp;nbsp; to end a variable&amp;nbsp; name,&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;part&amp;nbsp; 1 $ {variable} part 2&quot; - This format&amp;nbsp; helps you to clearly&amp;nbsp; end the variable&amp;nbsp; name,&amp;nbsp; The variable&amp;nbsp; name&amp;nbsp; starts at dollar sign before the open brace&amp;nbsp; (${) and ends at the close brace (}),&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;part&amp;nbsp; 1{$variable}part 2&quot; - This&amp;nbsp; format&amp;nbsp; is also called&amp;nbsp; complex&amp;nbsp; format, You use&amp;nbsp; this format&amp;nbsp; to specify&amp;nbsp; any complex variable&amp;nbsp; expression&amp;nbsp; in the same way&amp;nbsp; as in a normal&amp;nbsp; statement,&amp;nbsp; The van able expression&amp;nbsp; starts&amp;nbsp; at ( {$) followed&amp;nbsp; by a variable&amp;nbsp; name&amp;nbsp; and ends at (}).&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Here is a PHP script example of different ways to include variables in double-quoted strings:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$beer = &#39;Heineken&#39;;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
echo &quot;$beer&#39;s taste is great.&quot;;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
echo &quot;He drank some $ {beer}s and water.”;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
echo &quot;She drank some&amp;nbsp; {$beer}s and water.”;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
This script will print: Heineken’s taste is great.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
He drank some Heinekens and water.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
She drank some Heinekens and water.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;62.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;How Many Ways to Include Array Elements in Double-Quoted Strings using PHP?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
There are 2 formats to include array elements in double-quoted strings in PHP:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;part 1 $array[key]&amp;nbsp; part 2&quot; - This is called simple format.&amp;nbsp; In this format, you can not specify the element key in quotes.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;part 1 {$array[&#39;key&#39;]} part 2&quot; - This is called complex format. In this format, the array element expression is specified in the same way as in a normal statement. Here is a PHP script example of different ways to include variables in double-quoted strings&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$fruits = array (‘strawberry’ =&amp;gt; &#39;red&#39;, &#39;banana&#39; =&amp;gt; &#39;yellow&#39;);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
echo &quot;A banana&amp;nbsp; is $fruits[banana].”;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
echo &quot;A banana&amp;nbsp; is {Sfruits[&#39;banana&#39;]}”.;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
This script will print: A banana is yellow.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
A banana is yellow.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&quot;A banana is $fruits[&#39;banana&#39;].&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
“ will give you a syntax error.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;63.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;How to Access a Specific Character in a String using PHP?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Any character in a string can be accessed by a special string element expression:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $string{index}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - The index is the position of the character counted from left and starting from 0. Here is a PHP script example:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$string = &#39;It&#39;s Friday!’;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
echo &quot;The first character is $string {0}”;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
echo &quot;The first&amp;nbsp; character&amp;nbsp; is {$string{0}}”;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
This script will print:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
The first character is It&#39;s Friday! {0} The first character is I&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;64.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;How to Assigning a New Character in a String using PHP?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
The string element expression, $string{index}, can also be used&amp;nbsp; at the left side of an assignment&amp;nbsp; statement. This allows you to assign a new character to any position in a string. Here is a PHP script example:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$string = &#39;It&#39;s Friday?&#39;;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
echo &quot;$string&quot;;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$string{11} = &#39;!&#39;;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
echo &quot;$string&quot;;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
This script will print: It&#39;s Friday?&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
It&#39;s Friday!&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;65.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;How to Concatenate Two Strings Together in PHP?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
You can use the string concatenation operator (.) to join two strings into one. Here is a PHP script example of string concatenation:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
This script will print: Hello World!&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;66.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;How to Compare Two Strings with Comparison Operators in PHP7&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
PHP supports 3 string comparison operators,&amp;nbsp;&amp;nbsp; &amp;lt;, ==, and &amp;gt;, that generates Boolean values.&amp;nbsp; Those&amp;nbsp; operators&amp;nbsp; use&amp;nbsp; ASCII&amp;nbsp; values&amp;nbsp; of characters&amp;nbsp;&amp;nbsp; from&amp;nbsp; both&amp;nbsp; strings&amp;nbsp; to determine&amp;nbsp; the comparison&amp;nbsp; results.&amp;nbsp; Here is a PHP script on how to use comparison&amp;nbsp;&amp;nbsp; operators:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$a = &quot;PHP is a scripting language.&quot;;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$b = &quot;PHP is a general-purpose&amp;nbsp;&amp;nbsp; language.&quot;;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
if($a &amp;gt; $b) {&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print(&#39;$a&amp;nbsp; &amp;gt;-$b is true.&#39;.””);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
} else {&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print(&#39;$a&amp;nbsp; &amp;gt;-$b is false.&#39;,&quot;&quot;);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
}&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
if($a==$b)&amp;nbsp; {&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print(&#39;$a == $b is true.&#39;.&quot;&quot;);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
} else {&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print(&#39;$a== $b is false.&#39;.&quot;&quot;);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
}&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
if($a&amp;nbsp; &amp;lt; $b) {&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print(&#39;$a&amp;lt; $b is true.&#39;.&quot;&quot;);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
} else&amp;nbsp; {&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print(&#39;$a&amp;lt; $b is false!&quot;“);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
}&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
This script will print:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$a &amp;gt; $b is true.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$a == $b is false. $a &amp;lt; $b is false.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;67.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;How to Convert Numbers to Strings in PHP?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
In a string context, PHP will automatically convert any numeric value to a string. Here is a PHP script examples:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print(-1.3e3);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print(&quot; &quot;);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print(slrlen(-1.3e3));&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print(&quot; &quot;);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print(&quot;Price&amp;nbsp; = $&quot;&amp;nbsp; . 99.99&amp;nbsp; . &quot;”);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print(l . &quot;+&quot;. 2 .&quot;=&quot;.1+2.&quot;&quot;);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print(l&amp;nbsp;&amp;nbsp; .&quot;+ “.2.&quot;=&quot;.(1+2).&quot;”);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print(l&amp;nbsp;&amp;nbsp; .&quot;+&quot;.2.&quot;=” 3&quot;);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print(&quot;“);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
This script will print:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
-1300&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
5&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Price = $99.99&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
3&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
1+2=3&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
1+2=3&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
The print() function requires a string, so numeric value&amp;nbsp; -1.3e3 is automatically converted to a string &quot;-1300&quot;.&amp;nbsp; The concatenation operator (.) also requires a string, so numeric value 99.99 is automatically converted to a string &quot;99.99&quot;. Expression (1. &quot;+ &#39;&quot;. 2.&quot; =&quot; . 1+2. &quot;&quot;) is a little bit interesting.&amp;nbsp; The result is &quot;3&quot; because concatenation operations and addition operation are carried out from left to right. So when the addition operation is reached. We have &quot;1 + 2 = 1&quot;+2, which will cause the string to be converted to a value 1.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;68.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;How to Convert Strings to Numbers in PHP?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
In a numeric context, PHP will automatically convert any string to a numeric value. Strings will be converted into two types of numeric values, double floating number and integer, based on the following rules:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The value is given by the initial portion of the string. If the string starts with valid numeric data, this will be the value used.&amp;nbsp; Otherwise the value will be 0 (zero).&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If the valid numeric data contains &#39;.&#39;, &#39;e&#39;, or &#39;E&#39;, it will be converted to a double floating number. Otherwise it will be converted to an integer.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;69.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;How to Get the Number of Characters in a String?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
You can use the &quot;strlen()&quot; function to get the number of characters in a string. Here is a PHP script example of strlen():&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print(strlen(&#39;lt&#39;s Friday!”));&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
This script will print:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
12&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;70.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;How to Remove White Spaces from the Beginning and/or the End of a String in PHP?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
There are 4 PHP functions you can use remove white space characters from the beginning and/or the end of a string:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; trim() - Remove white space characters from the beginning and the end of a string.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ltrim() - Remove white space characters from the beginning of a string.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rtrim() - Remove white space characters from the end of a string.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; chop() - Same as rtrim().&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
White space characters are defined as:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot; &quot; (ASCII&amp;nbsp; 32 (ox20)), an ordinary space.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot; &quot; (ASCII&amp;nbsp; 9 (Ox09)), a tab.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; “ &quot; (ASCII&amp;nbsp; 10 (OxOA)), a new line (line feed)&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;&quot; (ASCII&amp;nbsp; 13 (OxOD)), a carriage&amp;nbsp; return.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot; &quot; (ASCII&amp;nbsp; 0 (OxOO)), the NULL-byte.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;xOB&quot; (ASCII&amp;nbsp; 11 (OxOB), a vertical tab.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Here is a PHP script example of trimming strings:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$text =&quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Hello world!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;&#39;;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$leftTrimmed = ltrim($text);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$rightTrimmed = rtrim($text);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$bothTrimmed = trim($text);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print(“leftTrimmed = ($leftTrimmed)“);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print(“rightTrimmed = ($rightTrimmed)&quot;);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print(“bothTrimmed = ($bothTrimmed)”);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
This script will print:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt; leftTrimmed = (Hello
world!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
rightTrimmed = (&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Hello world!)&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
bothTrimmed = (Hello world!)&lt;br /&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;71.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;How to Remove the New Line Character from the End of a Text Line in PHP?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
If you are using fgets() to read a line from a text file, you may want to use the chop() function to remove the new line character from the end of the line as shown in this PHP script:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$handle = fopen(&quot;/tmp/inputfile.txt&quot;, &quot;r&quot;);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
while($line=fgets())&amp;nbsp;&amp;nbsp; {&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$line = chop($line.);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
# process $line here ...&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
}&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
fclose($handle);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;72.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;How To Remove Leading and Trailing Spaces from User Input Values in PHP?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
If you are taking input values from users with a Web form, users may enter extra spaces at the beginning and/or the end of the input values. You should always use the trim() function to remove those extra spaces as shown in this PHP script:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$name = $_REQUEST(&quot;name&quot;);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$name = trim($name);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
# $name is ready to be used...&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;73.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;How to Find a Substring from a Given String in PHP?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
To find a substring in a given string, you can use the strpos() function.&amp;nbsp; If you call strpos($haystack, $needle),&amp;nbsp; it will try to find the position&amp;nbsp; of the first&amp;nbsp; occurrence the $needle&amp;nbsp; string&amp;nbsp; in the $haystack string.&amp;nbsp; If found, it will return a non-negative integer represents the position of $needle.&amp;nbsp; Otherwise, it will return a Boolean false. Here is a PHP script example of strpos():&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$haystack1&amp;nbsp; = &quot;123456789hello10111213&quot;;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$haystack2&amp;nbsp; = &quot;hello123456789&quot;;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$haystack3&amp;nbsp; = &quot;hello123456789hh12&quot;;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$pos1 = strpos($haystackl,&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;hello&quot;);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$pos2 = strpos($haystac.k2,&amp;nbsp; &quot;hello&quot;);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$pos3 = strpos($haystack3,&amp;nbsp;&amp;nbsp; &quot;hello&quot;);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print(&quot;pos1&amp;nbsp; = ($post);&amp;nbsp;&amp;nbsp; type is &quot; . gettype($pos1)&amp;nbsp;&amp;nbsp; . &quot; &quot;);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print(&quot;pos2&amp;nbsp; = (sposz);&amp;nbsp; type is &quot; . gettype($pos2)&amp;nbsp;&amp;nbsp; . &quot; &quot;);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print(&quot;pos3&amp;nbsp; = ($pos3); type is &quot; . gettype($pos3)&amp;nbsp;&amp;nbsp; . &quot;”);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
This script will print&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
pos1 = (9); type is integer&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
pos2 = (0); type is integer&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
pos3 = 0; type is boolean&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&quot;pos3&quot; shows strpos() can return a Boolean value&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;74.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;What Is the Best Way to Test the strpos() Return Value in PHP?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Because strpos() could two types of values, Integer and Boolean, you&amp;nbsp; need&amp;nbsp; to be careful&amp;nbsp; about&amp;nbsp; testing the return value. The best way is to use the &quot;Identical(===)&quot; operator. Do not use the &quot;Equal(==)&quot; operator, because it does not differentiate&amp;nbsp; &quot;0&quot; and &quot;false&quot;. Check out this PHP script on how to use strpos():&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$haystack&amp;nbsp; = &quot;needle234953413434516504381640386488129&quot;;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$pos = strpos($haystack, &quot;needle&quot;};&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
if ($pos==false)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print(&quot;Not found based (==)&amp;nbsp;&amp;nbsp;&amp;nbsp; test “);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
} else {&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print(&quot;Found&amp;nbsp; based&amp;nbsp; (==) test”);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
}&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
if ($pos===false)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print(&#39;&#39;Not found based (===) test&quot;);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
} else {&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print(&quot;Found based&amp;nbsp; (===) test”);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
}&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
This script will print:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Not found based (==) test&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Found based (===) test&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Of course, (===) test is correct.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;75.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;How To Take a Substring from a Given. String in PHP?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
If you know the position of a substring in a given string, you can take the substring out by the substr() function. Here is a PHP script on how to use substr():&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$string= &quot;beginning&quot;;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print(&quot;Position counted from left: &quot;.substr($string,0,5).&quot; “);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print(“Position counted form right: &quot;.substr($string,-7,3).&quot; “);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
This script will print:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Position counted from left: begin&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Position counted form right: gin&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
substr() can take negative starting position counted from the end of the string.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;76.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;How to Replace a Substring in a Given String in PHP?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
If you know the position of a substring in a given string, you can replace that substring by another string by using the substr _replaceO&amp;nbsp; function.&amp;nbsp; Here is a PHP script on how to use substr_replace():&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$string = &quot;Warning:&amp;nbsp; System will shut down in NN minutes!&quot;;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$pos = strpos($striug, &quot;NN&quot;);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print(substr_replace($string, &quot;15&quot;, $pos, 2).&quot; “);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
sleep(10*60);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print(substr_replace($string, &quot;5&quot;, $pos, 2).&quot;“);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
This script will print:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Warning:&amp;nbsp; System will shut down in 15 minutes!&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
(10 minutes later)&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Warning:&amp;nbsp; System will shut down in 5 minutes!&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Like substr(), substr_replace() can take negative starting position counted from the end of the string.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;77.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;How can we repair a MySQL table?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
The syntax for repairing a MySQL table is:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
REPAIR TABLE tablename&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
REPAIR TABLE tablename QUICK&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
REPAIR. TABLE tablename EXTENDED&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
This command will repair the table specified.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
If QUICK is given, MySQL will do a repair of only the index tree.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
If EXTENDED is given, it will create index row by row.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;78.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;What does a special set of tags do in PHP?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
What does a special set of tags do in PHP? The output is displayed directly to the browser.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;79.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;How do you define a constant in PHP?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Via define()&amp;nbsp; directive,&amp;nbsp; like define (“MYCONSTANT&quot;,&amp;nbsp; 100);&lt;b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;80.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;How to Write the FORM Tag Correctly for Uploading Files?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
When users clicks the submit button, files specified in the &lt;input ...=&quot;&quot; type=&quot;FILE &quot; /&gt; will be transferred from the browser to the Web server. This transferring (uploading) process is controlled by a properly written&lt;br /&gt;
&lt;form ...=&quot;&quot;&gt;
tag as:&lt;/form&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;form action=&quot;receiving.php&quot; enctype=&quot;multipart/form-data&quot; method=&quot;post&quot;&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Note&lt;/b&gt; &lt;b&gt;that&lt;/b&gt; you must specify METHOD as &quot;post&quot; and ENCTYPE as &quot;multipart/form-data&quot;&amp;nbsp;&amp;nbsp; in order for the uploading process to work.&amp;nbsp; The following PHP code, called logo_upload.php, shows you a complete FORM tag for file uploading:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print(&quot;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print(&quot;Please&amp;nbsp; submit&amp;nbsp; an image file a Web site logo for&quot;.&quot;google.com:&lt;br /&gt;
n&quot;);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print(&quot;&lt;input name=&quot;google_logo&quot; type=&quot;file&quot; /&gt;&lt;br /&gt;
n &quot;);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print(&quot;&lt;input type=&quot;submit&quot; /&gt;n&quot;);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print(&quot;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
?&amp;gt;&lt;br /&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;81.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;How to Get the Uploaded File Information in the Receiving Script?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Once the Web server received the uploaded file, it will call the PHP script specified in the form. action attribute to process&amp;nbsp; them. This receiving PHP script can get the uploaded file information through the predefined array called $_FILES.&amp;nbsp; Uploaded file information is organized in $_FILES as a two-dimensional array as:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $_FILES [$fieldName][&#39;name&#39;] - The Original file name on the browser&amp;nbsp; system.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $_FILES [$fieldName][&#39;type&#39;]&amp;nbsp;&amp;nbsp; - The file type determined&amp;nbsp; by the browser.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $_FILES [$fieldName][&#39;size&#39;]&amp;nbsp; - The Number&amp;nbsp; of bytes of the file content.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $_FILES [$fieldName][‘tmp _ name&#39;]&amp;nbsp; - The temporary filename of the file in which the uploaded&amp;nbsp; file was stored on the server.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $_FILES [$fieldName][&#39;error&#39;] -&amp;nbsp; The error code associated with&amp;nbsp; this file upload.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
The $fieldName is the name used in the &lt;input name=&quot;fieldName&quot; type=&quot;FILE, &quot; /&gt;.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;82.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;How can I execute a PHP script using command line?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Just run the PHP CLI (Command Line Interface) program and provide the PHP script file name as the command line argument. For example, &quot;php myScript.php&quot;, assuming &quot;php&quot; is the command to invoke the CLI program.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Be aware that if your PHP script was written for the Web CGI interface, it may not execute properly in command line environment.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;83.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what is the problem?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
PHP Interpreter treats numbers beginning with 0 as octal. Look at the similar PHP interview questions for more numeric problems.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;84.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;Would I use print &quot;$a dollars&quot; or&quot; {$a} dollars&quot; to print out the amount of dollars in this example?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
In this example it wouldn&#39;t matter, since the variable is all by itself, but if you were to print something like &quot;{$a}, 000,000 mln dollars&quot;, then you definitely need to use the braces.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/span&gt; &lt;span style=&quot;text-indent: -0.25in;&quot;&gt;85.&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;What are the different tables present MySQL? Which type of table is generated when we are creating a table in the following syntax:&lt;/b&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt; &lt;/span&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;create table employee (eno int(2),ename&amp;nbsp;&amp;nbsp; varchar(10))?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Total 5 types of tables we can create&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
1. MyISAM&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
2. Heap&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
3. Merge&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
4. INNO DB&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
5. ISAM&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
MyISAM is the default storage engine as of MySQL 3.23. When you fire the above create query MySQL will create a MyISAM table.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;86.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;How to Create a Table using PHP?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
If you want to create a table, you can run the CREATE TABLE statement as shown in the following sample script:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
include &quot;mysql_ connection.php&#39;&#39;;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$sql= &quot;CREATE TABLE&amp;nbsp; ggl_links&amp;nbsp; (&quot; .&quot; id INTEGER&amp;nbsp; NOT NULL&quot;. &quot;, url VARCHAR(80) NOT NULL&quot;. &quot;, notes VARCHAR(1024)&quot;. &quot;, counts INTEGER&quot;. &quot;, time TIMESTAMP DEFAULT sysdate()&quot;. &quot;)&#39;&quot;;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
if (mysql_ query($sql, $con)&amp;nbsp;&amp;nbsp; (&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print(&quot;Table ggl_links created.n&quot;);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
} else (&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
printf(“Table creation failed.n&quot;);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
}&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
mysql_close($con);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
?&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Remember that mysql_ query() returns TRUE/FALSE on CREATE&amp;nbsp; statements. If you run this script, you will get something like this: Table ggl_links created.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;87.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;How can we encrypt the username &amp;amp; password using PHP?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 1:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
You can encrypt a password with the following Mysql&amp;gt;SET PASSWORD=PASSWORD (“Password”);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 2:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
You can use the MySQL PASSWORD() function to encrypt username and password. For example, INSERT into user (password, …) VALUES (PASSWORD($password&quot;)), ...);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;88.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;How do you pass a variable by value?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Just like in C++, put an ampersand in front of it, like $a = &amp;amp;$b&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;89.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;When are you supposed to use endif to end the conditional statement?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
When the original if was followed by : and then the code block without braces.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;90.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;How can we send mail using JavaScript?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
No. There is no way to send emails directly using JavaScript.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
But you can use JavaScript to execute a client side email program send the email using the &quot;rnailto&quot; code. Here is an example:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
function myfunction(form)&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
{&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
tdata=document.myform.tbox1.value;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
location=”mailto:mailid@domain.com?subject= ...&quot;; return&amp;nbsp; true;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;91.&lt;/b&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;What is the difference between ereg_replace() and eregi_replace()?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
eregi _replace() function is identical to ereg_replace() except that it ignores case distinction&amp;nbsp; when matching alphabetic characters.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/b&gt; &lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;92.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;How do I find out the number of parameters passed into function9?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
func _num _args() function&amp;nbsp; returns&amp;nbsp; the number&amp;nbsp; of parameters&amp;nbsp; passed&amp;nbsp; in.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 93.&lt;/b&gt;&amp;nbsp;&lt;b&gt;What is the purpose of the following files having extensions:&amp;nbsp; frm, myd, and myi? What these files contain?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
In MySQL, the default table type is MyISAM.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Each MyISAM table is stored on disk in three flies.&amp;nbsp; The files have names that begin with the table name and have an extension to indicate the file type.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
The &#39;.frm&#39; file stores the table definition.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
The data file has a &#39;.MYD’ (MYData) extension.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
The index file lias a &#39;.MYI&#39; (MYIndex) extension,&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 94.&lt;/b&gt;&amp;nbsp;&lt;b&gt;If the variable $a is equal to 5 and variable $b is equal to character a, what’s the value of $$b?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
100, it&#39;s a reference to existing variable.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 95.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;How to Protect Special Characters in Query String?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
If you&amp;nbsp; want to include&amp;nbsp; special&amp;nbsp; characters&amp;nbsp; like spaces&amp;nbsp; in the query&amp;nbsp; string,&amp;nbsp; you need&amp;nbsp; to protect&amp;nbsp; them&amp;nbsp; by applying&amp;nbsp; the urlencode() translation&amp;nbsp; function.&amp;nbsp; The script below shows how to use urlencode():&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&quot;)&amp;nbsp; ;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print(&quot;Please click the links below&quot;.&quot; to submit comments about google.com:&lt;br /&gt;
&quot;);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$comment = &#39;I want to say: &quot;It&#39;s a good site!&amp;nbsp; :-&amp;gt;’&quot;;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$comment = urlencode($comment);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print(&quot;&quot;.&quot;&lt;a href=&quot;https://www.blogger.com/processing_forms.php?name=Guest&amp;amp;comment=$comment&quot;&gt;&quot;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
.&quot;It&#39;s an excellent site!&lt;/div&gt;
&quot;);&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$comment = &#39;This visitor said: &quot;It&#39;s an average site!:-(&#39;&#39;&#39;;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Scomment = urlencode($comment);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print(&quot;&quot;.&#39;&lt;a href=&quot;https://www.blogger.com/processing_%20%C2%A0forms.php?%27.$comment.:&quot;&gt;&#39;.&quot;It&#39;s an average site. &lt;/a&gt;&quot;);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print(&quot;&quot;);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 96.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;Are objects passed by value or by reference?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Everything is passed by value.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 97.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;What are the differences between DROP a table and TRUNCATE a table?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;DROP&lt;/b&gt; TABLE&amp;nbsp; &lt;b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 98.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;Differences&amp;nbsp;between GET and POST methods in form submitting, give the case where we can use GET and we can use POST methods?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
When&amp;nbsp; we submit&amp;nbsp; a form, which&amp;nbsp; has the GET method&amp;nbsp; it displays&amp;nbsp; pair&amp;nbsp; of name/value&amp;nbsp;&amp;nbsp; used in the form at the address&amp;nbsp; bar of the browser&amp;nbsp; preceded&amp;nbsp; by&amp;nbsp;URL. Post method&amp;nbsp;doesn&#39;t&amp;nbsp;display these values.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
table_name&amp;nbsp; - This will delete the table and its data.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;TRUNCATE&lt;/b&gt; TABLE&amp;nbsp; table_name&amp;nbsp; - This will delete the data of the table, but not the table definition.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 99.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;How do you call a constructor for a parent class?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
parent::constructor($value)&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 101.&lt;/b&gt;&amp;nbsp;&lt;b&gt;What is tile special meaning of __sleep&amp;nbsp;&amp;nbsp; and__wakeup?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
__sleep returns the array of all the variables than need to be saved, while __wakeup retrieves them.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 102.&lt;/b&gt;&amp;nbsp;&lt;b&gt;Would you initialize your strings with single quotes or double quotes?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Since the data inside the single-quoted&amp;nbsp;&amp;nbsp; string is not parsed&amp;nbsp; for variable&amp;nbsp; substitution,&amp;nbsp;&amp;nbsp; it&#39;s&amp;nbsp; always&amp;nbsp; a better&amp;nbsp; idea speed-wise&amp;nbsp;&amp;nbsp; to initialize&amp;nbsp; a string with single quotes,&amp;nbsp; un1ess you specifically&amp;nbsp; need variable&amp;nbsp; substitution.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 103.&lt;/b&gt;&amp;nbsp;&lt;b&gt;How can we extract string abc.com from a string http://info@abc.com using regular expression of php?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
We can use the preg_match() function with &quot;/.*@(.*)$/&quot; as the regular expression pattern. For example:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
preg_ match(&quot;/. *@(.*)$/&quot; , &#39;&#39;http://info@abc.com&#39;&#39; ,$data);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
echo $data[1];&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 104.&lt;/b&gt;&amp;nbsp;&lt;b&gt;How come the code works, but does not for two-dimensional array of mine?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Any time you have an array with more than one dimension, complex parsing syntax is required.&amp;nbsp; print “Contents:&amp;nbsp; {$arr[1][2]} &quot; would&#39;ve&amp;nbsp; worked.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;105.&lt;/b&gt;&amp;nbsp;&lt;b&gt;How can we register the variables into a session?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
session_ register($session_ var);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$_SESSION[&#39;var&#39;) = &#39;value&#39;;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 106.&lt;/b&gt;&amp;nbsp;&lt;b&gt;What is the difference between characters \023 and \x23?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
The first one is octal 23, the second is hex 23.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 107.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;With a heredoc syntax, do I get variable substitution inside the heredoc contents?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Yes.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 108.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;How many ways we can retrieve the date in result set of MySQL using php?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
As individual objects so single record or as a set or arrays.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 109.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;Can we use include (&quot;abc.php&quot;) two times in a php page “makeit.php&quot;?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Yes.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 110.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;For printing out strings, there are echo, print and printf. Explain the differences.&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
echo is the most&amp;nbsp; 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&amp;nbsp; it), but it returns TRUE on successful output and FALSE&amp;nbsp; if it was tillable to print out the string.&amp;nbsp; However, you can pass multiple parameters to echo, like:&lt;b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
and it will output&amp;nbsp; the string &quot;Welcome to Google!&quot; 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&#39;s&amp;nbsp; the slowest way to print out data out of echo, print and printf&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 111.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;I am writing an application in PHP that outputs a printable version of driving directions.&amp;nbsp; It contains some long sentences, and I am a neat freak, and would like to make sure that no line exceeds 50 characters.&amp;nbsp; How do I accomplish that with PHP?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
On large strings that need to be formatted according to some length specifications, use wordwrap()&amp;nbsp; or chunk _ split().&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 112.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;What is the output of the ucwords function in this example?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$formatted&amp;nbsp; = ucwords(&quot;Google is COLLECTION of information&quot;);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print $formatted;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
What will be printed is Google is COLLECTION of information.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&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&#39;s worth using strtolower()&amp;nbsp; first.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 113.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;What Is the difference between htmlentities() and htmlspecialchars()?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Htmlspecialchars only takes care of &amp;lt;, &amp;gt;, single quote ‘double quote “and ampersand.&amp;nbsp; htmlentities translates&amp;nbsp;&amp;nbsp; all occurrences of character sequences that have different meaning in HTML.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 114.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;How can we destroy the session, how can we unset the variable of a session?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
session_unregister() - Unregister a global variable from the current session session_unset()&amp;nbsp; - Free all session variables&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 115.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;What are the different functions in sorting an array&#39;?&lt;/b&gt; &lt;b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Sorting functions in PHP:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
asort()&amp;nbsp;&amp;nbsp;&amp;nbsp; arsort()&amp;nbsp;&amp;nbsp; ksort() krsort() uksort()&amp;nbsp; sort() natsort() rsort()&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 116.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;How can we know the count/number of elements of an array?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
2 ways:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
a) sizeof($array) - This function&amp;nbsp; is an alias of count()&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
b) count($urarray) - This function&amp;nbsp; returns&amp;nbsp; the number&amp;nbsp; of elements&amp;nbsp; in an array.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Interestingly if you just pass a simple var instead of an array, count() will return 1.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 117.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;How many ways we can pass the variable through the navigation between the pages?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
At least 3 ways:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
I. Put the variable into session in the first page,&amp;nbsp; and get it back from session&amp;nbsp; in the next page.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
2. Put the variable&amp;nbsp; into cookie in the first page, and get it back from&amp;nbsp; the cookie in the next page.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
3. Put the variable&amp;nbsp; into a hidden&amp;nbsp; form field, and get it back from the form in the next page.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 118.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;What is the maximum length of a table name, a database name, or a field name in MySQL?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Database name: 64 characters Table name: 64 characters Column name:&amp;nbsp; 64 charac.ters&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 119.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;How many values can the SET function of MySQL take?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
MySQL SET function can take zero or more values, but at the maximum it can take 64 values.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 120.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;How can we find the number of rows in a table using MySQL?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Use this for MySQL&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
SELECT COUNT(*)&amp;nbsp; FROM&amp;nbsp; table_name;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt; &lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 121.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;What is the difference between md5(), crc32() and sha1() crypto on PHP?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
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;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 122.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;How can we find the number of rows in a result set using PHP?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Here is how you can find the number of rows in a result set in PHP:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$result = mysql_ query($any _valid _ sql, $database _link);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$num _rows = mysql_ num _rows($result);•&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
echo &quot;$num_rows&amp;nbsp; rows found&quot;;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 123.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;How many ways we can we find the current date using MySQL?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
SELECT CURDATE();&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
SELECT CURRENT _DATE();&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
SELECT CURTIME();&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
SELECT CURRENT _TIME();&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 124.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;Give the syntax of GRANT commands?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
The generic syntax for GRANT is as following&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
GRANT [rights) on [database] TO [username@hostname) IDENTIFIED BY [password] Now rights can be:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
a) ALL privileges&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
b) Combination of CREATE, DROP,&amp;nbsp; SELECT,&amp;nbsp; INSERT,&amp;nbsp; UPDATE&amp;nbsp; and DELETE&amp;nbsp; etc.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
We can grant rights on all database by using *.* or some specific database by database.* or a specific table by database.table_name.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 125.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;Give the syntax of REVOKE commands?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
The generic syntax for revoke is as following:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
REVOKE [rights] on [database] FROM [username@hostname]&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Now rights can be:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
a) ALL privileges&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
b) Combination of CREATE,&amp;nbsp; DROP,&amp;nbsp; SELECT,&amp;nbsp; INSERT, UPDATE and DELETE&amp;nbsp; etc.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
We can grant rights on all database by using *.* or some specific database by database. * or a specific table by database.table_name.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 126.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;What is the difference between CHAR and VARCHAR data types?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
CHAR is a fixed length data type. CHAR(n) will take n characters of storage even if you enter less than n characters to that column. For example, &#39;&#39;Hello!&#39;&#39; will be stored as &quot;Hello!&quot; in CHAR(10) column.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
VARCHAR is a variable length data type. VARCHAR(n) will take only the required storage for the actual number of characters&amp;nbsp; entered to that column. For example, &quot;Hello!&quot; will be stored as &quot;Hello!&#39; in VARCHAR( 10) column.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 127.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;How can we encrypt and decrypt a data present in a MySQL table using MySQL?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
AES_ENCRYPT() and AES_DECRYPT()&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 128.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;What is the functionality of MD5 function in PHP?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
string md5(string)&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
It calculates the MDS hash of a string. The hash is a 32-character hexadecimal number.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 129.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;How can we change the data type of a column of a table?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
This will change the data type of a column:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
ALTER TABLE table_name CHANGE colmname same_colm_name[new data type]&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 130.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;What is the difference between GROUP BY and ORDER BY in SQL?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
To sort a result, use an ORDER BY clause.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
The most general way to satisfy a GROUP BY clause is to scan the whole table and create&amp;nbsp; a new temporary&amp;nbsp; table where all rows from each&amp;nbsp; group&amp;nbsp; are consecutive, and then use this temporary table to discover&amp;nbsp; groups&amp;nbsp; and apply aggregate functions (if any).&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
ORDER BY [col1],[coI2], ...[coln]; Tells DBMS according to what columns it should sort the result If two rows will have the same value in cok1 it will try to sort them according to co12 and so on.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
GROUP BY [col1],[co12], ...[coln]; Tells DBMS to group (aggregate) results with same value of column col1 . You can use COUNT(col1),&amp;nbsp; SUM(col1), AVG(col1) with it, if you want to count all items in group, sum all values or view average.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 131.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;How can we know that a session is started or not?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
A session starts by session_start() function,&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
This session_start() is always declared in header portion. It always declares first then we write session_register().&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 132.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;What are the MySQL database files stored in system?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Data is stored in name.myd&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Table structure is stored in name.frm&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Index is stored in name.myi&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 133.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;What is the difference between PHP4 and PHP5?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
PHP4 cannot support oops concepts and Zend engine 1 is used.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
PHP5 supports oops concepts and Zend engine 2 is used. Error supporting is increased in PHP5.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
XML and SQLite will is increased in PHP5.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 134.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;What is meant by nl2br()?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer l:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
nl2br() inserts a HTML tag&lt;br /&gt;
before all new line characters n in a string.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
echo nl2br(&quot;god&amp;nbsp; bless n you&quot;);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Output: &lt;/b&gt;god bless&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
you&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 135.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;How can we encrypt and decrypt a data presented in a table using MySQL?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
You can use functions: AES_ENCRYPTO and AES_DECRYPTO like:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
AES_ENCRYPT(str, key_str)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AES_DECRYPT(crypt_str, key_str)&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 136.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;What are encryption functions in PHP?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
CRYPT()&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
MD5()&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 137.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;What types of images that php supports?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Using imagetypes() function to find out what types of images are supported in your PHP engine.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Imagetypes() - Returns&amp;nbsp; the image types supported.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
This function returns a bit-field corresponding to the image formats supported by the version of GD linked into PHP.&amp;nbsp; The following bits are returned, IMG _ GIF | IMG_JPG | IMG_PNG | IMG_ WBMP | IMG_XPM.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 138.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;How can I know that a variable is a number or not using a JavaScript?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 1:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
bool is_ numeric( mixed var)&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Returns TRUE if var is a number or a numeric string, FALSE otherwise.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Answer 2:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Definition and Usage&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
The is NaN() function is used to check if a value&amp;nbsp; is not a number.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Syntax is NaN(number)&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Parameter Description:&lt;/b&gt; number required.&amp;nbsp; The value to be tested&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 139.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;How can we destroy the cookie in PHP?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Set the cookie with a past expiration time.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 140.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;What are the current versions of Apache, PHP, and MySQL?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
PHP: PHP 5.5.14&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
MySQL:&amp;nbsp; MySQL 5.6.24&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Apache:&amp;nbsp; Apache 2.4.12&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 141.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;What is the use of friend function in PHP?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Friend functions&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Sometimes a function is best&quot; shared among a number of different classes.&amp;nbsp; Such functions can be declared either as member functions of one class or as global functions. In either case they can be set to be friends of other classes, by using a friend specifier in the class that is admitting them. Such functions can use all attributes of the class which names them as a friend, as if they were themselves members of that class. A friend declaration is essentially a prototype for a member function, but instead of requiring an implementation with the name of that class attached by the double colon syntax, a global function or member function of another class provides the match.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
class mylinkage&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
{&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;private:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
mylinkage * prev;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
mylinkage * next;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;protected:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
friend void set_prev(mylinkage* L, mylinkage* N);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
void set_next(mylinkage* L);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;public:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
mylinkage * succ();&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
mylinkage * pred();&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
mylinkage();&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
};&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
void mylinkage::set_next(mylinkage*&amp;nbsp; L) {next&amp;nbsp; = L; }&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
void set_prev(mylinkage * L, mylinkage * N) {N-&amp;gt;prev = L; }&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Friends in other classes&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
It is possible to specify a member function of another class as a friend as follows:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
class C&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
{ friend int B:: f1(); };&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
class B&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
{ int f1(); };&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
It is also possible to specify all the functions in another class as friends, by specifying the entire class as a friend.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
class A&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
{ friend class B; };&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 142.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/b&gt;&lt;b&gt;How can we get second of the current time using date function?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$second = date(&quot;s&quot;);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 143.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;How can I make a script that can be bilingual (supports English, German)?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
You can change charset variable in above line in the script to support bilanguage.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 144.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;What are the differences between abstract class and interface?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Abstract class:&lt;/b&gt; abstract classes are the class where one or more methods are abstract but not necessarily all method has to be abstract. Abstract methods are the methods, which are declare in its class but not define. The definition of those methods must be in its extending class.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Interface&lt;/b&gt;: Interfaces are one type of class where all the methods are abstract: That means all the methods only declared but not defined. All the methods must be define by its implemented class.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 145.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;What are the advantages of stored procedures, triggers, indexes in PHP?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
A stored procedure is a set of SQL commands that can be compiled and stored in the server. Once this has been done, clients don’t need to keep re-issuing the entire query but can refer to the stored procedure. This provides better overall performance because the query has to be parsed only once, and less information needs to be sent between the server and the client. You can also raise the conceptual level by having libraries of functions in the server. However, stored procedures of course do increase the load on the database server system, as more of the work is done on the server side and less on the client (application) side.&amp;nbsp; Triggers will also be implemented. A trigger is effectively a type of stored procedure, one that is invoked when a particular event occurs. For example, you can install a stored procedure that is triggered each time a record is deleted from a transaction table and that stored procedure automatically deletes the corresponding customer from a customer table when all his transactions are deleted. Indexes are used to find rows with specific column values quickly. Without an index, MySQL must begin with the first row and then read through the entire table to find the relevant rows. The larger the table, the more this costs. If the table has an index for columns in question, MySQL can quickly determine the position to seek to in the middle of the data file without having to look at all the data.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 146.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;What is maximum size of a database in MySQL?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
If the operating system or file system places a limit on the number of files in a directory, MySQL is bound by that constraint. The efficiency of the operating system in handling large numbers of files in a directory can place a practical limit on the number of tables in a database. If the time required to open a file in the directory increases significantly as the number of files increases, database performance can be adversely affected.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
The amount of available disk space limits the number of tables.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
MySQL 3.22 had a 4GB (4 gigabytes) limit on table size. With the&amp;nbsp;&amp;nbsp; &lt;b&gt;MyISAM&lt;/b&gt; &lt;b&gt;storage&lt;/b&gt; &lt;b&gt;engine&lt;/b&gt; in MySQL 3.23, the maximum table size was increased to 65536 terabytes (2567 -1 bytes). With this larger allowed table size, the maximum effective table size for MySQL databases is usually determined by operating system constraints on file sizes, not by MySQL internal limits.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
The &lt;b&gt;InnoDB&lt;/b&gt; &lt;b&gt;storage&lt;/b&gt; &lt;b&gt;engine&lt;/b&gt; maintains InnoDB tables within a tablespace that can be created from several files. This allows a table to exceed the maximum individual file size. The tablespace can include raw disk partitions, which allows extremely large tables. The maximum tablespace size is 64TB.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 147.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;Explain normalization concept?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
The&amp;nbsp; normalization process involves getting our data to conform&amp;nbsp; to three&amp;nbsp; progressive&amp;nbsp;&amp;nbsp; normal&amp;nbsp; forms,&amp;nbsp; and a higher&amp;nbsp; level&amp;nbsp; of normalization&amp;nbsp;&amp;nbsp; cannot&amp;nbsp; be achieved&amp;nbsp; until the previous&amp;nbsp; levels have been achieved&amp;nbsp; (there are actually&amp;nbsp; five normal&amp;nbsp; forms, but the last two are mainly&amp;nbsp; academic&amp;nbsp; and will not be discussed).&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;First Normal Form&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
The First Normal Form (or INF) involves removal of redundant data from horizontal rows. We want to ensure that there is no duplication of data in a given row&amp;nbsp;and that every column stores the least amount of information possible (making the field atomic).&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Second Normal Form&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Where the First Normal Form deals with redundancy of data across a horizontal row, Second Normal Form (or 2NF) deals with redundancy of data in vertical columns. As stated earlier, the normal forms are progressive,&amp;nbsp;&amp;nbsp; so to achieve Second Normal Form, your tables must already be in First Normal Form.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Third Normal Form&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
I have a confession to make; I do not often use Third Normal Form. In Third Normal Form we are looking for data in our tables that is not fully dependent on the primary key, but defendant on another value in the table&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 148.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;What type of inheritance that php supports?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
In PHP an extended class is always dependent on a single base class, that is, multiple inheritance is not supported.&amp;nbsp; Classes are extended using the keyword ‘extends’.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 149.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;How can increase tile performance of MySQL select query?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
We can use LIMIT to stop MySQL for further search in table after we have received our required no. of records, also we can use LEFT JOIN or RIGHT JOIN instead of full join in cases we have related&amp;nbsp; data in two or more tables.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 150.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;How can I use the COM components in php?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
The COM class provides a framework to integrate (D) COM components into your PHP scripts.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;string COM&lt;/b&gt;::COM(&amp;nbsp; string_module_name [,string server_name [,int&amp;nbsp; codepage]])&amp;nbsp; - COM class constructor. &lt;b&gt;Parameters:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;module _name:&lt;/b&gt;&amp;nbsp; name or class-id of the requested component.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;server_ name:&lt;/b&gt;&amp;nbsp; name of the DCOM server from which the component should be fetched. If NULL, localhost is assumed. To allow DCOM com, allow_ dcom has to be set to TRUE in php.ini.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;codepage &lt;/b&gt;- specifies tile codepage that is used to convert php-strings to unicode-strings and vice versa.&amp;nbsp; Possible values are CP_ACP, CP_MACCP,&amp;nbsp;&amp;nbsp; and CP _OEMCP, CP_SYMBOL, CP_THREAD_ACP, CP_UTF7 and CP_UTF8.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Usage&lt;/b&gt;:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$word-&amp;gt;Visible = 1; //open an empty document&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$word-&amp;gt;Documents-&amp;gt;Add();&amp;nbsp; //do&amp;nbsp; some weird stuff&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$word-&amp;gt;Selection-&amp;gt;TypeText(&quot;This is a test ... &quot;);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$word-&amp;gt;Documents [1] -&amp;gt;Save As (&quot;Useless test.doc&quot;); //closing word&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$word-&amp;gt;Quit();&amp;nbsp;&amp;nbsp; //free the .object&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$word-&amp;gt;Release();&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$word = null;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 151.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;How many ways we can give the output to a browser?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
HTMLoutput, PHP, ASP, JSP, Servlet Function&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Script Language output Function&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Different Type of embedded Package to output to a browser&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 152.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;What changes I have to do in php.ini file for file uploading?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Make the following line uncomment like:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
; Whether to allow HTTP file uploads. file_uploads = On&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
; Temporary directory for HTTP uploaded files (will use system default if not&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
; specified).&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
upload _tmp _ dir = C:apache2triadtemp&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
; Maximum allowed size for uploaded files. upload_max _ filesize = 2M&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 153.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;What type of headers have to be added in the mail function to attach a file?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$boundary = &#39;--&#39;.md5(uniqid (rand()) );&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$headers = &quot;From:&amp;nbsp; &quot;Me&quot;n&quot;;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$headers .= “MIME-Version: 1.0n&quot;;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$headers .= &quot;Content- Type: multipart/mixed;&amp;nbsp;&amp;nbsp; boundary=’$boundary&#39;&quot;;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 154.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;What is the difference between Reply-to and Return-path in the headers of a mail function?&lt;/b&gt; &lt;b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Reply-to: Reply-to is where to deliver the reply of the mail.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Return-path:&amp;nbsp; Return path is when there is a mail delivery failure occurs then where to deliver the failure notification.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 155.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;Explain about Type Juggling in php?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
PHP does not require (or support) explicit type definition in variable declaration; a variable’s type is determined by the context in which that variable is used. That is to say, if you assign a string value to variable $var, $var becomes a string. If you then assign an integer value to $var, it becomes an integer.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
An example of PHP’s automatic type conversion is the addition operator ‘+&#39;. If any of the operands is a float, then all operands are evaluated as floats, and the result will be a float. Otherwise, the operands will be interpreted&amp;nbsp;&amp;nbsp; as integers, and the result will also be an integer.&amp;nbsp; Note that this does NOT change the types of the operands themselves; the only change is in how the operands are evaluated.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$foo += 2; //$foo is now an integer (2)&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$foo = Sfoo + 1.3; // $foo is now a float (3.3)&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$foo = 5 + &quot;10 Little Piggies&quot;; // $foo is integer (15)&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$foo = 5 + &quot;10 Small pigs&quot;; // $foo is integer (15)&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
If the last two examples above seem odd, see string conversion to numbers.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
If you wish to change the type of a variable, see settypef).&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
If you would like to test any of the examples in this section, you can use the var_dump () function.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Note: The behavior of an automatic conversion to array is currently undefined.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Since PHP (for historical reasons) supports indexing into strings via offsets using the same syntax as array indexing, the example above leads to a problem should $a become an array with its first element being “f&quot;, or should &quot;f&#39; become the first character of&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 156.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;How to Turn on the Session Support in PHP?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
The session support can be turned on automatically at the site level, or manually in each PHP page script&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
* Turning on session support automatically&amp;nbsp;&amp;nbsp; at the site level: Set session.auto_start= 1 in php.ini.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
* Turning on session support manually in each page script:&amp;nbsp; Call session_start() function,&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 157.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;Explain the ternary conditional operator in PHP&#39;?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Expression preceding the. ? is evaluated,&amp;nbsp; if it&#39;s&amp;nbsp; true, then the expression&amp;nbsp; preceding&amp;nbsp; the : is executed,&amp;nbsp; otherwise,&amp;nbsp; the expression&amp;nbsp; following:&amp;nbsp;&amp;nbsp; is executed.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 158.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;How to Read the Entire File into a Single String?&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
If you have a file, and you want to read the entire file into a single string, you can use the file_get_contents()&amp;nbsp;&amp;nbsp; function.&amp;nbsp; It opens the specified file, reads all characters ill the file, and returns them in a single string. Here is a PHP script example on how to file_get_ contents():&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
$file = file _get_ contents(&quot;/windows/system32/drivers/etc/services&quot;);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
print(&quot;Size&amp;nbsp; of the file: &quot;.strlen($file). &quot;n&quot;);&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
This script will print:&amp;nbsp; Size of the file: 7116&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;159.&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;What is the difference between Get &amp;amp; Post method?&lt;/b&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;table border=&quot;1&quot; class=&quot;MsoTable15Grid1LightAccent4&quot; style=&quot;border-collapse: collapse; border: none; mso-border-alt: solid #FFE599 .5pt; mso-border-themecolor: accent4; mso-border-themetint: 102; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184; width: 642px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;height: 18.85pt; mso-yfti-firstrow: yes; mso-yfti-irow: -1; mso-yfti-lastfirstrow: yes;&quot;&gt;
  &lt;td style=&quot;border-bottom: solid #FFD966 1.5pt; border: solid #FFE599 1.0pt; height: 18.85pt; mso-border-alt: solid #FFE599 .5pt; mso-border-bottom-alt: solid #FFD966 1.5pt; mso-border-bottom-themecolor: accent4; mso-border-bottom-themecolor: accent4; mso-border-bottom-themetint: 153; mso-border-bottom-themetint: 153; mso-border-themecolor: accent4; mso-border-themecolor: accent4; mso-border-themetint: 102; mso-border-themetint: 102; padding: 0in 5.4pt 0in 5.4pt; width: 85.25pt;&quot; valign=&quot;top&quot; width=&quot;114&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Action&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid #FFD966 1.5pt; border-left: none; border-right: solid #FFE599 1.0pt; border-top: solid #FFE599 1.0pt; height: 18.85pt; mso-border-alt: solid #FFE599 .5pt; mso-border-bottom-alt: solid #FFD966 1.5pt; mso-border-bottom-themecolor: accent4; mso-border-bottom-themecolor: accent4; mso-border-bottom-themetint: 153; mso-border-bottom-themetint: 153; mso-border-left-alt: solid #FFE599 .5pt; mso-border-left-themecolor: accent4; mso-border-left-themetint: 102; mso-border-right-themecolor: accent4; mso-border-right-themetint: 102; mso-border-themecolor: accent4; mso-border-themetint: 102; mso-border-top-themecolor: accent4; mso-border-top-themetint: 102; padding: 0in 5.4pt 0in 5.4pt; width: 189.0pt;&quot; valign=&quot;top&quot; width=&quot;252&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;GET method&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid #FFD966 1.5pt; border-left: none; border-right: solid #FFE599 1.0pt; border-top: solid #FFE599 1.0pt; height: 18.85pt; mso-border-alt: solid #FFE599 .5pt; mso-border-bottom-alt: solid #FFD966 1.5pt; mso-border-bottom-themecolor: accent4; mso-border-bottom-themecolor: accent4; mso-border-bottom-themetint: 153; mso-border-bottom-themetint: 153; mso-border-left-alt: solid #FFE599 .5pt; mso-border-left-themecolor: accent4; mso-border-left-themetint: 102; mso-border-right-themecolor: accent4; mso-border-right-themetint: 102; mso-border-themecolor: accent4; mso-border-themetint: 102; mso-border-top-themecolor: accent4; mso-border-top-themetint: 102; padding: 0in 5.4pt 0in 5.4pt; width: 207.0pt;&quot; valign=&quot;top&quot; width=&quot;276&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;POST method&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: solid #FFE599 1.0pt; mso-border-alt: solid #FFE599 .5pt; mso-border-themecolor: accent4; mso-border-themecolor: accent4; mso-border-themetint: 102; mso-border-themetint: 102; mso-border-top-alt: solid #FFE599 .5pt; mso-border-top-themecolor: accent4; mso-border-top-themetint: 102; padding: 0in 5.4pt 0in 5.4pt; width: 85.25pt;&quot; valign=&quot;top&quot; width=&quot;114&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Back Button /Reload&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid #FFE599 1.0pt; border-left: none; border-right: solid #FFE599 1.0pt; border-top: none; mso-border-alt: solid #FFE599 .5pt; mso-border-bottom-themecolor: accent4; mso-border-bottom-themetint: 102; mso-border-left-alt: solid #FFE599 .5pt; mso-border-left-themecolor: accent4; mso-border-left-themetint: 102; mso-border-right-themecolor: accent4; mso-border-right-themetint: 102; mso-border-themecolor: accent4; mso-border-themetint: 102; mso-border-top-alt: solid #FFE599 .5pt; mso-border-top-themecolor: accent4; mso-border-top-themetint: 102; padding: 0in 5.4pt 0in 5.4pt; width: 189.0pt;&quot; valign=&quot;top&quot; width=&quot;252&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Harmless&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid #FFE599 1.0pt; border-left: none; border-right: solid #FFE599 1.0pt; border-top: none; mso-border-alt: solid #FFE599 .5pt; mso-border-bottom-themecolor: accent4; mso-border-bottom-themetint: 102; mso-border-left-alt: solid #FFE599 .5pt; mso-border-left-themecolor: accent4; mso-border-left-themetint: 102; mso-border-right-themecolor: accent4; mso-border-right-themetint: 102; mso-border-themecolor: accent4; mso-border-themetint: 102; mso-border-top-alt: solid #FFE599 .5pt; mso-border-top-themecolor: accent4; mso-border-top-themetint: 102; padding: 0in 5.4pt 0in 5.4pt; width: 207.0pt;&quot; valign=&quot;top&quot; width=&quot;276&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Data will be re-submitted ( the browser should alert user that the data are about to be re-submitted)&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: solid #FFE599 1.0pt; mso-border-alt: solid #FFE599 .5pt; mso-border-themecolor: accent4; mso-border-themecolor: accent4; mso-border-themetint: 102; mso-border-themetint: 102; mso-border-top-alt: solid #FFE599 .5pt; mso-border-top-themecolor: accent4; mso-border-top-themetint: 102; padding: 0in 5.4pt 0in 5.4pt; width: 85.25pt;&quot; valign=&quot;top&quot; width=&quot;114&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Bookmarked&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid #FFE599 1.0pt; border-left: none; border-right: solid #FFE599 1.0pt; border-top: none; mso-border-alt: solid #FFE599 .5pt; mso-border-bottom-themecolor: accent4; mso-border-bottom-themetint: 102; mso-border-left-alt: solid #FFE599 .5pt; mso-border-left-themecolor: accent4; mso-border-left-themetint: 102; mso-border-right-themecolor: accent4; mso-border-right-themetint: 102; mso-border-themecolor: accent4; mso-border-themetint: 102; mso-border-top-alt: solid #FFE599 .5pt; mso-border-top-themecolor: accent4; mso-border-top-themetint: 102; padding: 0in 5.4pt 0in 5.4pt; width: 189.0pt;&quot; valign=&quot;top&quot; width=&quot;252&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Can be bookmarked&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid #FFE599 1.0pt; border-left: none; border-right: solid #FFE599 1.0pt; border-top: none; mso-border-alt: solid #FFE599 .5pt; mso-border-bottom-themecolor: accent4; mso-border-bottom-themetint: 102; mso-border-left-alt: solid #FFE599 .5pt; mso-border-left-themecolor: accent4; mso-border-left-themetint: 102; mso-border-right-themecolor: accent4; mso-border-right-themetint: 102; mso-border-themecolor: accent4; mso-border-themetint: 102; mso-border-top-alt: solid #FFE599 .5pt; mso-border-top-themecolor: accent4; mso-border-top-themetint: 102; padding: 0in 5.4pt 0in 5.4pt; width: 207.0pt;&quot; valign=&quot;top&quot; width=&quot;276&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Can’t be bookmarked&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: solid #FFE599 1.0pt; mso-border-alt: solid #FFE599 .5pt; mso-border-themecolor: accent4; mso-border-themecolor: accent4; mso-border-themetint: 102; mso-border-themetint: 102; mso-border-top-alt: solid #FFE599 .5pt; mso-border-top-themecolor: accent4; mso-border-top-themetint: 102; padding: 0in 5.4pt 0in 5.4pt; width: 85.25pt;&quot; valign=&quot;top&quot; width=&quot;114&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Cached&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid #FFE599 1.0pt; border-left: none; border-right: solid #FFE599 1.0pt; border-top: none; mso-border-alt: solid #FFE599 .5pt; mso-border-bottom-themecolor: accent4; mso-border-bottom-themetint: 102; mso-border-left-alt: solid #FFE599 .5pt; mso-border-left-themecolor: accent4; mso-border-left-themetint: 102; mso-border-right-themecolor: accent4; mso-border-right-themetint: 102; mso-border-themecolor: accent4; mso-border-themetint: 102; mso-border-top-alt: solid #FFE599 .5pt; mso-border-top-themecolor: accent4; mso-border-top-themetint: 102; padding: 0in 5.4pt 0in 5.4pt; width: 189.0pt;&quot; valign=&quot;top&quot; width=&quot;252&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Can be cached&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid #FFE599 1.0pt; border-left: none; border-right: solid #FFE599 1.0pt; border-top: none; mso-border-alt: solid #FFE599 .5pt; mso-border-bottom-themecolor: accent4; mso-border-bottom-themetint: 102; mso-border-left-alt: solid #FFE599 .5pt; mso-border-left-themecolor: accent4; mso-border-left-themetint: 102; mso-border-right-themecolor: accent4; mso-border-right-themetint: 102; mso-border-themecolor: accent4; mso-border-themetint: 102; mso-border-top-alt: solid #FFE599 .5pt; mso-border-top-themecolor: accent4; mso-border-top-themetint: 102; padding: 0in 5.4pt 0in 5.4pt; width: 207.0pt;&quot; valign=&quot;top&quot; width=&quot;276&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Can’t be cached&lt;b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: solid #FFE599 1.0pt; mso-border-alt: solid #FFE599 .5pt; mso-border-themecolor: accent4; mso-border-themecolor: accent4; mso-border-themetint: 102; mso-border-themetint: 102; mso-border-top-alt: solid #FFE599 .5pt; mso-border-top-themecolor: accent4; mso-border-top-themetint: 102; padding: 0in 5.4pt 0in 5.4pt; width: 85.25pt;&quot; valign=&quot;top&quot; width=&quot;114&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Encoding Type&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid #FFE599 1.0pt; border-left: none; border-right: solid #FFE599 1.0pt; border-top: none; mso-border-alt: solid #FFE599 .5pt; mso-border-bottom-themecolor: accent4; mso-border-bottom-themetint: 102; mso-border-left-alt: solid #FFE599 .5pt; mso-border-left-themecolor: accent4; mso-border-left-themetint: 102; mso-border-right-themecolor: accent4; mso-border-right-themetint: 102; mso-border-themecolor: accent4; mso-border-themetint: 102; mso-border-top-alt: solid #FFE599 .5pt; mso-border-top-themecolor: accent4; mso-border-top-themetint: 102; padding: 0in 5.4pt 0in 5.4pt; width: 189.0pt;&quot; valign=&quot;top&quot; width=&quot;252&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Application/ x-www-form-url encoded&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid #FFE599 1.0pt; border-left: none; border-right: solid #FFE599 1.0pt; border-top: none; mso-border-alt: solid #FFE599 .5pt; mso-border-bottom-themecolor: accent4; mso-border-bottom-themetint: 102; mso-border-left-alt: solid #FFE599 .5pt; mso-border-left-themecolor: accent4; mso-border-left-themetint: 102; mso-border-right-themecolor: accent4; mso-border-right-themetint: 102; mso-border-themecolor: accent4; mso-border-themetint: 102; mso-border-top-alt: solid #FFE599 .5pt; mso-border-top-themecolor: accent4; mso-border-top-themetint: 102; padding: 0in 5.4pt 0in 5.4pt; width: 207.0pt;&quot; valign=&quot;top&quot; width=&quot;276&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Application/ x-www-form-url encoded or multipart/form-data. Use multipart encoding for binary data.&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: solid #FFE599 1.0pt; mso-border-alt: solid #FFE599 .5pt; mso-border-themecolor: accent4; mso-border-themecolor: accent4; mso-border-themetint: 102; mso-border-themetint: 102; mso-border-top-alt: solid #FFE599 .5pt; mso-border-top-themecolor: accent4; mso-border-top-themetint: 102; padding: 0in 5.4pt 0in 5.4pt; width: 85.25pt;&quot; valign=&quot;top&quot; width=&quot;114&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;History&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid #FFE599 1.0pt; border-left: none; border-right: solid #FFE599 1.0pt; border-top: none; mso-border-alt: solid #FFE599 .5pt; mso-border-bottom-themecolor: accent4; mso-border-bottom-themetint: 102; mso-border-left-alt: solid #FFE599 .5pt; mso-border-left-themecolor: accent4; mso-border-left-themetint: 102; mso-border-right-themecolor: accent4; mso-border-right-themetint: 102; mso-border-themecolor: accent4; mso-border-themetint: 102; mso-border-top-alt: solid #FFE599 .5pt; mso-border-top-themecolor: accent4; mso-border-top-themetint: 102; padding: 0in 5.4pt 0in 5.4pt; width: 189.0pt;&quot; valign=&quot;top&quot; width=&quot;252&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Parameters remains in browser history&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid #FFE599 1.0pt; border-left: none; border-right: solid #FFE599 1.0pt; border-top: none; mso-border-alt: solid #FFE599 .5pt; mso-border-bottom-themecolor: accent4; mso-border-bottom-themetint: 102; mso-border-left-alt: solid #FFE599 .5pt; mso-border-left-themecolor: accent4; mso-border-left-themetint: 102; mso-border-right-themecolor: accent4; mso-border-right-themetint: 102; mso-border-themecolor: accent4; mso-border-themetint: 102; mso-border-top-alt: solid #FFE599 .5pt; mso-border-top-themecolor: accent4; mso-border-top-themetint: 102; padding: 0in 5.4pt 0in 5.4pt; width: 207.0pt;&quot; valign=&quot;top&quot; width=&quot;276&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Parameters are not saved in browser history&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: solid #FFE599 1.0pt; mso-border-alt: solid #FFE599 .5pt; mso-border-themecolor: accent4; mso-border-themecolor: accent4; mso-border-themetint: 102; mso-border-themetint: 102; mso-border-top-alt: solid #FFE599 .5pt; mso-border-top-themecolor: accent4; mso-border-top-themetint: 102; padding: 0in 5.4pt 0in 5.4pt; width: 85.25pt;&quot; valign=&quot;top&quot; width=&quot;114&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Restrictions on data length&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid #FFE599 1.0pt; border-left: none; border-right: solid #FFE599 1.0pt; border-top: none; mso-border-alt: solid #FFE599 .5pt; mso-border-bottom-themecolor: accent4; mso-border-bottom-themetint: 102; mso-border-left-alt: solid #FFE599 .5pt; mso-border-left-themecolor: accent4; mso-border-left-themetint: 102; mso-border-right-themecolor: accent4; mso-border-right-themetint: 102; mso-border-themecolor: accent4; mso-border-themetint: 102; mso-border-top-alt: solid #FFE599 .5pt; mso-border-top-themecolor: accent4; mso-border-top-themetint: 102; padding: 0in 5.4pt 0in 5.4pt; width: 189.0pt;&quot; valign=&quot;top&quot; width=&quot;252&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Yes, When sending data, Get method add the data to url, length of url is limited (max length is 2048 characters)&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid #FFE599 1.0pt; border-left: none; border-right: solid #FFE599 1.0pt; border-top: none; mso-border-alt: solid #FFE599 .5pt; mso-border-bottom-themecolor: accent4; mso-border-bottom-themetint: 102; mso-border-left-alt: solid #FFE599 .5pt; mso-border-left-themecolor: accent4; mso-border-left-themetint: 102; mso-border-right-themecolor: accent4; mso-border-right-themetint: 102; mso-border-themecolor: accent4; mso-border-themetint: 102; mso-border-top-alt: solid #FFE599 .5pt; mso-border-top-themecolor: accent4; mso-border-top-themetint: 102; padding: 0in 5.4pt 0in 5.4pt; width: 207.0pt;&quot; valign=&quot;top&quot; width=&quot;276&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
No restrictions&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: solid #FFE599 1.0pt; mso-border-alt: solid #FFE599 .5pt; mso-border-themecolor: accent4; mso-border-themecolor: accent4; mso-border-themetint: 102; mso-border-themetint: 102; mso-border-top-alt: solid #FFE599 .5pt; mso-border-top-themecolor: accent4; mso-border-top-themetint: 102; padding: 0in 5.4pt 0in 5.4pt; width: 85.25pt;&quot; valign=&quot;top&quot; width=&quot;114&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Restrictions on data type&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid #FFE599 1.0pt; border-left: none; border-right: solid #FFE599 1.0pt; border-top: none; mso-border-alt: solid #FFE599 .5pt; mso-border-bottom-themecolor: accent4; mso-border-bottom-themetint: 102; mso-border-left-alt: solid #FFE599 .5pt; mso-border-left-themecolor: accent4; mso-border-left-themetint: 102; mso-border-right-themecolor: accent4; mso-border-right-themetint: 102; mso-border-themecolor: accent4; mso-border-themetint: 102; mso-border-top-alt: solid #FFE599 .5pt; mso-border-top-themecolor: accent4; mso-border-top-themetint: 102; padding: 0in 5.4pt 0in 5.4pt; width: 189.0pt;&quot; valign=&quot;top&quot; width=&quot;252&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Only ASCII characters allowed&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid #FFE599 1.0pt; border-left: none; border-right: solid #FFE599 1.0pt; border-top: none; mso-border-alt: solid #FFE599 .5pt; mso-border-bottom-themecolor: accent4; mso-border-bottom-themetint: 102; mso-border-left-alt: solid #FFE599 .5pt; mso-border-left-themecolor: accent4; mso-border-left-themetint: 102; mso-border-right-themecolor: accent4; mso-border-right-themetint: 102; mso-border-themecolor: accent4; mso-border-themetint: 102; mso-border-top-alt: solid #FFE599 .5pt; mso-border-top-themecolor: accent4; mso-border-top-themetint: 102; padding: 0in 5.4pt 0in 5.4pt; width: 207.0pt;&quot; valign=&quot;top&quot; width=&quot;276&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
No restrictions, Binary Data is also allowed&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: solid #FFE599 1.0pt; mso-border-alt: solid #FFE599 .5pt; mso-border-themecolor: accent4; mso-border-themecolor: accent4; mso-border-themetint: 102; mso-border-themetint: 102; mso-border-top-alt: solid #FFE599 .5pt; mso-border-top-themecolor: accent4; mso-border-top-themetint: 102; padding: 0in 5.4pt 0in 5.4pt; width: 85.25pt;&quot; valign=&quot;top&quot; width=&quot;114&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Security&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid #FFE599 1.0pt; border-left: none; border-right: solid #FFE599 1.0pt; border-top: none; mso-border-alt: solid #FFE599 .5pt; mso-border-bottom-themecolor: accent4; mso-border-bottom-themetint: 102; mso-border-left-alt: solid #FFE599 .5pt; mso-border-left-themecolor: accent4; mso-border-left-themetint: 102; mso-border-right-themecolor: accent4; mso-border-right-themetint: 102; mso-border-themecolor: accent4; mso-border-themetint: 102; mso-border-top-alt: solid #FFE599 .5pt; mso-border-top-themecolor: accent4; mso-border-top-themetint: 102; padding: 0in 5.4pt 0in 5.4pt; width: 189.0pt;&quot; valign=&quot;top&quot; width=&quot;252&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
GET is less secure compared to POST because data sent is part of the url. Never use GET when sending passwords or other sensitive information.&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid #FFE599 1.0pt; border-left: none; border-right: solid #FFE599 1.0pt; border-top: none; mso-border-alt: solid #FFE599 .5pt; mso-border-bottom-themecolor: accent4; mso-border-bottom-themetint: 102; mso-border-left-alt: solid #FFE599 .5pt; mso-border-left-themecolor: accent4; mso-border-left-themetint: 102; mso-border-right-themecolor: accent4; mso-border-right-themetint: 102; mso-border-themecolor: accent4; mso-border-themetint: 102; mso-border-top-alt: solid #FFE599 .5pt; mso-border-top-themecolor: accent4; mso-border-top-themetint: 102; padding: 0in 5.4pt 0in 5.4pt; width: 207.0pt;&quot; valign=&quot;top&quot; width=&quot;276&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
POST is little safer than GET because parameters are not stored in browser history or in web server.&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: solid #FFE599 1.0pt; mso-border-alt: solid #FFE599 .5pt; mso-border-themecolor: accent4; mso-border-themecolor: accent4; mso-border-themetint: 102; mso-border-themetint: 102; mso-border-top-alt: solid #FFE599 .5pt; mso-border-top-themecolor: accent4; mso-border-top-themetint: 102; padding: 0in 5.4pt 0in 5.4pt; width: 85.25pt;&quot; valign=&quot;top&quot; width=&quot;114&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Visibility&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid #FFE599 1.0pt; border-left: none; border-right: solid #FFE599 1.0pt; border-top: none; mso-border-alt: solid #FFE599 .5pt; mso-border-bottom-themecolor: accent4; mso-border-bottom-themetint: 102; mso-border-left-alt: solid #FFE599 .5pt; mso-border-left-themecolor: accent4; mso-border-left-themetint: 102; mso-border-right-themecolor: accent4; mso-border-right-themetint: 102; mso-border-themecolor: accent4; mso-border-themetint: 102; mso-border-top-alt: solid #FFE599 .5pt; mso-border-top-themecolor: accent4; mso-border-top-themetint: 102; padding: 0in 5.4pt 0in 5.4pt; width: 189.0pt;&quot; valign=&quot;top&quot; width=&quot;252&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Data is visible to everyone in URL&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid #FFE599 1.0pt; border-left: none; border-right: solid #FFE599 1.0pt; border-top: none; mso-border-alt: solid #FFE599 .5pt; mso-border-bottom-themecolor: accent4; mso-border-bottom-themetint: 102; mso-border-left-alt: solid #FFE599 .5pt; mso-border-left-themecolor: accent4; mso-border-left-themetint: 102; mso-border-right-themecolor: accent4; mso-border-right-themetint: 102; mso-border-themecolor: accent4; mso-border-themetint: 102; mso-border-top-alt: solid #FFE599 .5pt; mso-border-top-themecolor: accent4; mso-border-top-themetint: 102; padding: 0in 5.4pt 0in 5.4pt; width: 207.0pt;&quot; valign=&quot;top&quot; width=&quot;276&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Data is not displayed in URL&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://singhmayank776.blogspot.com/feeds/7521907467039916133/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9096903352259657395/7521907467039916133' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9096903352259657395/posts/default/7521907467039916133'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9096903352259657395/posts/default/7521907467039916133'/><link rel='alternate' type='text/html' href='http://singhmayank776.blogspot.com/2014/07/150-php-interview-questions-answers_14.html' title='150+ PHP Interview Questions &amp; Answers'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09094747098599435124</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-mcZtaq5ZDX8/Vp4pKIj4lhI/AAAAAAAAAzE/KCkWrALRsHU/s72-c/zend.jpg" height="72" width="72"/><thr:total>1</thr:total></entry></feed>