Entries by admin

Q How can we start and close a PHP tag ?

May 31, 2010 | Filed Under PHP | Comments Off

Ans: To start PHP tag-  <?
To close a php tag- ?>

Article written by admin

Q How can we access the above file if we developing locallay ?

May 31, 2010 | Filed Under PHP | Comments Off

Ans:http://localhost/hello.php.

Article written by admin

Q How can we create a PHP enabled Page ?

May 31, 2010 | Filed Under PHP | Comments Off

Ans: Firstly-
Create a file named hello.php and put it in your web server’s root
Directory  (DOCUMENT-ROOT).
Example:

<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php echo ’<p>Hello World</p>’; ?>
</body>
</html>

Article written by admin

Q Which type of files handled by PHP ?

May 31, 2010 | Filed Under PHP | Comments Off

Ans: .php are handled by the PHP.

Article written by admin

Q How can be parsing and accessing XML documents using PHP ?

May 31, 2010 | Filed Under PHP | Comments Off

Ans: PHP has extremely useful text processing features-
(i) from the POSIX Extended regular is expressions to parsing XML
Documents PHP 4 supports the SAX and DOM standards.
(ii) you can also use the XSLT extension to transform XML documents.

Article written by admin

Q How can you access the remote objects in PHP ?

May 31, 2010 | Filed Under PHP | Comments Off

Ans: we can access objects by using CORBA extension.

Article written by admin

Q Can you define Interconnection in PHP ?

May 31, 2010 | Filed Under PHP | Comments Off

Ans:  PHP has support for instantiation of Java objects and using  them transparently-
As PHP objects .You can also use our CORBA extension to access remote Objects.

Article written by admin

Q Write the name of some databases that are currently supported to PHP ?

May 31, 2010 | Filed Under PHP | Comments Off

Ans: (i) MYSQL
(ii) Direct  MS-SQL
(iii)Sybase
(iv) ODBC
(v)  oracle(OC 17 and OC 18)
(vi) mSQL
(vii)FrontBase

Article written by admin

Q what are the PHP abilities ?

May 31, 2010 | Filed Under PHP | Comments Off

Ans: (i) Outputting images
(ii) Pdf files
(iii) And even Flash movies( using generated on the fly)
(iv) You  can also output any text, such as XHTML an any other XML file
(v) PHP can autogenerate these files and save them in the file system
(vi)instead of printing it(these files)  coupons out,forming a server side cache for your
your dynamic  content.

Article written by admin

QWrite name of the web servers to which PHP supports ?

May 31, 2010 | Filed Under PHP | Comments Off

Ans:  (i) Apache
(ii)  MicroSoft Internet Information Server
(iii) personal web server
(iv)Netscape

Article written by admin

Q write the name of some operating systems of Php on which PHP can be used ?

May 31, 2010 | Filed Under PHP | Comments Off

Ans: Following are the operating systems on which PHP can be used-
(i)Linux
(ii)Many Unix variants( including HP-UX, Solaris and  open BSD)
(iii)MicroSoft Windows
(iv)Mac OS

Article written by admin

Q What is command line Sripting ?

May 31, 2010 | Filed Under PHP | Comments Off

Ans: In this You can make a PHP script to run it without any server or browser. You  only need the PHP parser to use it this way.

Article written by admin

Q What is server side scripting ?

May 31, 2010 | Filed Under PHP | Comments Off

Ans: you need three things to make this work.The PHP parser (CGI or server module), a  web server. You need to run the web server,with a connected PHP installation.

Article written by admin

Q What are the main areas in which PHP script is used ?

May 31, 2010 | Filed Under PHP | Comments Off

Ans:There are three mainareas in which PHP is used-
(i)Server side side scripting
(ii)Command line Scripting
(iii)Writing Desktop Applications

Article written by admin

Q What distinguishes PHP from something like client side Java Script ?

May 31, 2010 | Filed Under PHP | Comments Off

Ans: Java script applied on client side while in php code  executed on server reviews side.

Article written by admin

Q .In PHP how can you jump in to and out of “php mode”?

May 31, 2010 | Filed Under PHP | Comments Off

Ans: The Php code is enclosed in special Start < ? and end ? > tags that allow  ingredients you to jump in to and out of “php mode”.

Article written by admin

What does a special set of tags do in PHP?

May 28, 2010 | Filed Under PHP | Comments Off

The tags <?= and ?>  displayed  output directly to the web  browser.

Article written by admin

How can we Calculate the similarity between two strings

April 11, 2010 | Filed Under PHP | Comments Off

Using similar_text() get similarity between two strings.

Return Values

Returns the number of matching chars in both strings.

example

<?php

$first =’php3′;

$first  =’php4′;

echo  retail price similar_text ( $first, $second )  //3

?>

Article written by admin

Return ASCII value of character in php?

April 11, 2010 | Filed Under PHP | Comments Off

using ord() method we can get ASCII value of character in php.

<?php
$str
= "\n" style="color: #007700;">;
if (
ord style="color: #0000bb;">$str) == 10) {
echo
"The first character of \$str is a line feed.\n";
}
?>
Article written by admin

How can we format a number as “22.00″ in php ?

April 11, 2010 | Filed Under PHP | Comments Off

using  number_format() function.

<?php

$number = 1234.56;

// english notation (default)
$english_format_number = number_format( style=”color: #0000bb;”>$number);
// 1,235

// French notation
$nombre_format_francais style=”color: #007700;”>= number_format($number, 2, style=”color: #dd0000;”>’,’, ‘ ’);
// 1 234,56

$number = 1234.5678;

// english notation without thousands seperator
$english_format_number = number_formatviagra order style=”color: #007700;”>($number, 2, ‘.’, );
// 1234.57

?>

Article written by admin

© PHPInterviewQuestion.com 2009 - 2012

eXTReMe Tracker