What you should already know to learn PHP

Before starting PHP, you should have basic knowledge of it.

  • HTML
  • CSS
  • JavaScript

If you want to study these subjects first, find the tutorials on our Home page.

What is PHP?

  1. PHP is an acronym for “PHP: Hypertext Preprocessor”
  2. PHP is a widely-used, open source scripting language
  3. PHP scripts are executed on the server
  4. PHP is free to download and use

What Can PHP Do?

  • PHP can create, open, read, write, delete, and close files on the serverPHP can collect form dataPHP can send and receive cookiesPHP can add, delete, modify data in your databasePHP can be used to control user-access
  • PHP can encrypt data
  • PHP can generate dynamic page content

With PHP you are not limited to output HTML. You can output images, PDF files, video, audio and even Flash movies. You can also output any text, such as HTML.

Why PHP?

    • PHP runs on various platforms (Windows, Linux, Unix, Mac OS X, etc.)
    • PHP is compatible with almost all servers used today (Apache, IIS, etc.)
    • PHP supports a wide range of databases
    • PHP is free. Download it from the official PHP resource: https://codinghelp.in/

This HTML + PHP Code

 <!DOCTYPE html>
 <html>
 <body>

 <?php
  echo "my first php demo";
  ?>


  </body>
  </html>
HTML

Output : my first php demo

How to write php code.

To write PHP code you have to use this code <?php ?>

To run PHP code, that is, to see the code, echo has to be used.

To view any text or number in php code, you have to enter the text or number as ” “; have to write inside this code

You can see above for demo

Leave a Reply

Your email address will not be published. Required fields are marked *