Knowledge in php notes

PHP notes for professionals

This pdf file containing the advance knowledge of php programming. and this pdf file gives you professional knowledge about php programming.

PHP: The Basics

Here we get to know about the basic concepts of PHP like: PHP: The Basics What is it? What can it do? Fundamentals Preparing to code with PHP and many more...

PHP-Introduction to php

Here we get to know about the basic concepts of PHP like: Introduction to php Background History About Zend PHP 5 Architecture PHP Scripts and many more

PHP-PHP Classes & Object Orientation

Here we get to know about the basic concepts of PHP like: PHP Classes and Object Orientation What is a class? Class Definition An example class definition for a dog. The dog object has a single attribute, the name, and can perform the action of barking. Define the name of the class. Class Usage

PHP-Client/Server on the WWW

Here we get to know about the basic concepts of PHP like: Client/Server on the WWW Server Side Programming PHP - What is it / does it do? Static resources such as regular HTML are simply output to the client from the server PHP Summary PHP Language Basics PHP - Variables and many more

PHP-PHP NUMERIC AND STRING FUNCTIONS

Here we get to know about the basic concepts of PHP like: PHP NUMERIC AND STRING FUNCTIONS NUMERIC FUNCTIONS floor(): abs(): pow(): and many more functions

PHP-Ridiculous DB support

Here we get to know about the basic concepts of PHP like: Ridiculous DB support (and more) DB support Writing a database-enabled web page is incredibly simple Basic syntax Instruction Separation Comments TYPES Scalars Very simple: $foo = true; (boolean) $foo = 20; (integer) $foo = 3.1415; (float)

PHP-How to install PHP

Here we get to know about the basic concepts of PHP like: How to install PHP PHP References PHP functions Advantages of Using PHP to enhance Web pages: Easy to use Simpler than Perl Open source Multiple platform. How PHP Pages are Accessed and Interpreted WHH Note Exploring the Basic PHP Development Process

PHP-Hello World

Here we get to know about the basic concepts of PHP like: PHP Hello World In PHP, we use // to make a single-line comment or /* and */ to make a large comment block. > Variables are used for storing values, like text strings, numbers or arrays. > When a variable is declared, it can be used over and over again in your script. > All variables in PHP start with a $ sign symbol. > The correct way of declaring a variable in PHP:

PHP Introduction

PHP | IntroductionThe term PHP is an acronym for PHP: Hypertext Preprocessor. PHP is a server-side scripting language designed specifically for web development.Websites like www.facebook.com, www.yahoo.com are also built on PHP.One of the main reason behind this is that PHP can be easily embedded in HTML files and HTML codes can also be written in a PHP file.The thing that differentiates PHP with client-side language like HTML is, PHP codes are executed on server whereas HTML codes are directly rendered on the browser. PHP codes are first executed on the server and then the result is returned to the browser.The only information that the client or browser knows is the result returned after executing the PHP script on the server and not the actual PHP codes present in the PHP file. Also, PHP files can support other client-side scripting languages like CSS and JavaScript.Why should we use PHP?PHP can actually do anything related to server-side scripting or more popularly known as the backend of a website. For example, PHP can receive data from forms, generate dynamic page content, can work with databases, create sessions, send and receive cookies, send emails etc. There are also many hash functions available in PHP to encrypt user’s data that makes PHP secure and reliable to be used as a server-side scripting language. So these are some of the abilities of PHP that makes it suitable to be used as server-side scripting language. You will get to know more of these abilities in further tutorials.Even if you are not convinced by the above abilities of PHP, there are some more features of PHP. PHP can run on all major operating systems like Windows, Linux, Unix, Mac OS X etc. Almost all of the major servers available today like Apache supports PHP. PHP allows using wide range of databases. And the most important factor is that it is free to use and download and anyone can download PHP from its official source : www.php.net.

PHP Function

PHP | array_chunk() FunctionThe array_chunk() function is an inbuilt function in PHP which is used to split an array into parts or chunks of given size depending upon the parameters passed to the function. The last chunk may contain fewer elements than the desired size of the chunk.Syntax:array array_chunk( $array, $size, $preserve_keys ) Parameters: This function accepts three parameters as shown in the above syntax. The parameters are described below:$array: This parameter represents the array that is needed to be divided into chunks.$size: This parameter is an integer which defines the size of the chunks to be created.$preserve_keys: This parameter takes Boolean value. When this parameter is set to TRUE then the keys are preserved, otherwise the chunk is reindexed starting from 0.

How to send a GET request from PHP?

How to send a GET request from PHP?There are mainly two methods to send information to the web server which are listed below:GET Method: Requests data from a specified resource.POST Method: Submits data to be processed to a specified resource.Get Method: The GET method sends the encoded user information appended to the page request. The page and the encoded information are separated by the ‘?’ character.For example:https://www.google.com/search?q=hello Program: This program illustrates the use of GET method in PHP:main.php:<!DOCTYPE html> <html>   <head>     <title>Get request</title> </head>   <body>     <form action="welcome.php" method="get">               <table>             <tr>                 <td>First Name:</td>                 <td><input type="text" name="firstnamename"></td>             </tr>                       <tr>                 <td>E-mail:</td>                 <td><input type="text" name="emailid"></td>             </tr>                       <tr>                 <td></td>                 <td style="float:right;"><input type="submit"></td>             </tr>         </table>     </form> </body>   </html>                    welcome.php:<html>   <body>     Welcome to GeeksforGeeks!<br>           First Name: <?php echo $_GET["firstname"]; ?><br>     Email Address: <?php echo $_GET["emailid"]; ?> </body>   </html> Output:Before Clicking the button:After Clicking the button: