Print/echo statement (1) Like python or other programming language, Print in PHP or echo in PHP does the same job i.e printing the statement on the screen Example <?php print “This is php script”; echo ” This is php script”; ?> This is php script This is php script So it is obvious from the […]
PHP
How to Handle HTML forms with PHP
Today in this post, I would talk about Handling HTML forms with PHP. A simple example would be registration form. Lets create a html form with php We can save this file as myregistration.html and When you will open it you will get below html form. When you fill the data and click the submit […]
PHP Functions with practical examples
PHP has lot of in-built Functions for use. PHP also provides opportunity to create use defined function also as available with other programming languages. We will discussing here the various type of User defined PHP Functions What is a function? A function is a piece of code which takes one more input in the form […]
Useful PHP string functions
Here are detailed working on useful PHP string functions strlen() The PHP strlen() function returns the length of a string.The example below returns the length of the string “john”Example <?php echo strlen(“John”); ?> Output 4 Chr() Converts an ASCII value to its equivalent character Example The ASCII value 46 is the & symbol <?php $str […]
include or require function in PHP with practical examples
Website design require header,footer,side bar,right bar, ad bar on multiple pages.It is not possible to change these on thousand of web pages whenever we want to change anything. Include function in php solve this problem. We can use include function in PHP and include the content of a PHP file into another PHP file before […]
How to Use HTML Inside PHP on the Same Page
We know that it is a web server that processes a PHP file before sending the processed results to the web browser. But the question is how does a server know whether a file is a PHP file or not. Answer is by default servers look for PHP only in files that end with the […]