MYHOSPITALNOW.COM

Find Trusted Doctors & Hospitals

Discover healthcare providers, compare hospitals, and explore treatment options worldwide.

Free Treatment Quotes • Doctor Search • Hospital Comparison

Find Healthcare Options

www.myhospitalnow.com

PHP Tutorial for Beginners

PHP FRONT TO BACK

What is PHP?
:-
PHP: Hypertext Preprocessor(Recursive Acronym)
Server-Side Programming/Scripting Language
Can be embedded directly within HTML (<?php?>)
Files use a “.php” file extension

How Does PHP Work?
:- Client makes a request
Server runs PHP/extensions
Query database if needed
Load other files if needed
Result is sent back to client

Why Use PHP?
:- Easy To Learn Freedom
Free & Open Source Frameworks
Great support Database Compatibility
Cross-Platform

What Can PHP do?
:- Create dynamic page content Interact with databases
Interact with files on the server Access control
Collect & process forms Encrypt data
Send/ receive cookies Almost anything else

What Can You Build With PHP?
:- Basic Websites Content Management Systems
Blog Type Websites Membership Websites
Shopping Carts Search Engines
Social Networks Backend APIs

*** Install XAMPP Apache+MariaDB+PHP+Perl)(Latest version 7.1.1)
What is XAMPP?
:- XAMPP is the most popular PHP development environment

  • Install XAMPP his after open It and start Apache and MySQL go browser and search –
    https://loclalhost (here uses only htdocxs file your xampp file)

Variables
:- Prefix $
Start with a letter or an underscore
only letter, numbers and underscores
Case sensitive

Data types
:- String (ex- 12, 0, -34 etc.)
Integers (ex- 25.2654, 2.12, 41.54 etc.)
floats
Booleans (ex- true/false)
Arrays (ex- multiple values in one single variable)
Objects (ex- hold programming objects)
Null (ex- hold only one value- NULL)
Resource (ex- special variable that hold references to resources external to PHP)

  • some Data type class
    • $Output = ‘………’; (………= You can use any word which you shown in desktop )
    • $num1 = 4; ()
    • $num2 = 10;
    • $sum = #num1 + $num2;
    • $strings1 = ‘…….’;
    • $strings2 = ‘…….’;
    • $greeting = string1. ”. $strings.’!’;
    • $greeting2 = “$string1 $string2”;
    • $string3 = ‘They\’re Here”;
      :- define(‘GREETING’, ‘Hello Everyone’, true);
      :- echo greeting;
  • Array– basically variable that holds multiple values these are three types:-
    1) Indexed
    2) Associative
    3) Multi-dimensional

** 1)Indexed
some Indexed class
– $people = array(‘……..’, ‘………’, ‘……..’;
:- echo $people[3];

123456- $ids = array (23, 55, 12);:- echo $ids[2]; - $cars= ['honda', 'Toyota', 'Ford';]:- $cars[3]= 'Chevy';:- echo $ids[3];

** 2) Associative arrays
– $people = array(‘…….’=> 35, ‘……..’=> 32, ‘……..’ => 27);
:- $ids = [22 => ‘…….’ ];
:- echo $ [‘……’];

** 3) Multi Dimensional
$cars = array(
array(‘Honda’, 20, 10),
array (‘Toyota’, 30, 20),
array (‘Ford’, 23, 12),
);
echo $cars[1][2]

Some Important Rational Operators-

==  equal to    5==2            false
!=  not equal to    5!=2        true
=== identical   $a===$b         True if $a is equal to $b
                                and they are of the same
<>  not euqal   $a <> $b        true if $a is not euqal to 
                                $b, or they are not of the same 
<=> spaceship   $a <=> $b       it returns -1, 0 or 1 when $a is 
                                respectivelt less than, equal to, or 
                                 greater than $bCode language: PHP (php)

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
I'm Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms. I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.

Related Posts

Encryption using RSA public and Private Key using PHP

PHP's OpenSSL extension can create an RSA key pair, encrypt data with the public key and decrypt it with the private key. This page explains the gist…

Read More

Encryption using Public key and Private key in PHP using mySql database

This tutorial shows how to generate an RSA key pair with PHP's OpenSSL extension, encrypt form input with the public key, store the ciphertext in MySQL, and…

Read More

How to see number of emails sent using smtp in laravel

Laravel does not count or log SMTP emails by default, so a grep will only return a real number once your application writes one log line for…

Read More

What are the Authentication type in phpmyadmin which for config.inc.php

phpMyAdmin supports four authentication types, set per server with $cfg['Servers'][$i]['auth_type'] in config.inc.php: cookie (the default), config, http and signon. This page explains how each one works and…

Read More

What is opcache and Install / Configure in Linux

OPcache is PHP's built-in bytecode cache. It keeps compiled scripts in shared memory so PHP doesn't have to parse and compile the same files on every request….

Read More

PHP Code for Godaddy VPS Server SMTP Email Relay

This page shows how to send email from a GoDaddy VPS through GoDaddy's SMTP relay on port 25 with plain PHP sockets and no extra libraries. Below…

Read More