📲 Download Utility Tools Apps

EMI Calculator

Download EMI Calculator

SOA Games

Download SOA Games

SOA Technology App

Download SOA Technology

BMI Checker

Download BMI Checker

Task Jira

Download Task Jira

Laughing Adda

Download Laughing Adda

📅 हिंदी कैलेंडर ऐप डाउनलोड करें

Download Shubhcalendar App

1. Introduction to PHP

✅ 1. What is PHP?

PHP stands for Hypertext Preprocessor.

  • It is a server-side scripting language
  • Used to create dynamic websites
  • Runs on the server, not in the browser

👉 Example:

<?php
echo "Hello World";
?>

👉 Output in browser:

Hello World

📌 Key Uses:

  • Login systems
  • Contact forms
  • E-commerce websites
  • CMS (WordPress, Joomla)

✅ 2. History & Versions

  • Created by Rasmus Lerdorf (1994)
  • Initially called Personal Home Page
  • Later evolved into a full programming language

📌 Important Versions:

  • PHP 5 → OOP introduced
  • PHP 7 → Faster performance 🚀
  • PHP 8 → Latest features (JIT, better error handling)

👉 Current modern version: PHP 8+


✅ 3. How PHP Works (Client vs Server)

📌 Flow:

  1. User opens website in browser (Client)
  2. Request goes to server
  3. Server runs PHP code
  4. Server sends HTML output
  5. Browser displays result

👉 Diagram (simple):

Browser → Server (PHP runs) → HTML → Browser

📌 Important:

  • Browser never sees PHP code
  • It only sees the output (HTML)

✅ 4. Installing XAMPP / WAMP / LAMP

To run PHP locally, you need a local server.

🔹 Options:

  • XAMPP (Windows, Linux, Mac) ⭐ Recommended
  • WAMP (Windows)
  • LAMP (Linux)

🔹 XAMPP Installation Steps:

  1. Download from: https://www.apachefriends.org
  2. Install software
  3. Open XAMPP Control Panel
  4. Start:
    • Apache ✅
    • MySQL ✅

📁 Folder:

htdocs/

👉 Place your PHP files here


✅ 5. Running First PHP Script

Step 1: Create file

hello.php

Step 2: Write code

<?php
echo "My First PHP Program!";
?>

Step 3: Save in:

htdocs/hello.php

Step 4: Run in browser:

http://localhost/hello.php

👉 Output:

My First PHP Program!

✅ 6. PHP Syntax Basics

🔹 PHP Tags

<?php
// PHP code here
?>

🔹 Echo (Print Output)

echo "Hello";
print "World";

🔹 Variables

$name = "Aditya";
$age = 25;

📌 Rules:

  • Starts with $
  • Case-sensitive

🔹 Comments

// Single line
# Single line
/* Multi-line */

🔹 Data Types

$string = "Hello";
$int = 10;
$float = 10.5;
$bool = true;
$array = [1,2,3];

🔹 Simple Example

<?php
$name = "Aditya";
echo "Welcome " . $name;
?>

👉 Output:

Welcome Aditya

🎯 Summary

  • PHP is a server-side language
  • Used to build dynamic websites
  • Runs on Apache server (XAMPP)
  • Easy syntax for beginners


AI Spiritual Tools & Interactive Experiences

Explore powerful AI-driven tools for daily guidance, spirituality, fun quizzes, and self-discovery.

Today’s Quote

Get inspiring daily quotes powered by AI to motivate and guide your day.

Explore Now

AI Tarot Card Reader

Reveal insights about your future, love, and career with AI tarot readings.

Read Tarot

Love Match Calculator

Check compatibility and love predictions using AI-based analysis.

Check Match

Fortune Cookie

Open an AI fortune cookie and receive wisdom, luck, and fun messages.

Open Cookie

Quiz Categories

Engage with knowledge-based and fun quizzes across multiple categories.

Start Quiz

Panchang Calendar

View daily Panchang, auspicious timings, tithi, nakshatra, and festivals.

View Panchang

Online Numerology

Discover your destiny number, life path, and numerology predictions.

Calculate Now

Spiritual Feeds

Stay connected with spiritual thoughts, mantras, and divine content.

View Feeds

Quiz Hub

Attempt trending quizzes on GK, spirituality, festivals, and more.

Explore Quizzes