Discover millions of ebooks, audiobooks, and so much more with a free trial

Only $11.99/month after trial. Cancel anytime.

Introduction to PHP, Part 1, Second Edition
Introduction to PHP, Part 1, Second Edition
Introduction to PHP, Part 1, Second Edition
Ebook79 pages56 minutes

Introduction to PHP, Part 1, Second Edition

Rating: 0 out of 5 stars

()

Read preview

About this ebook

It is the new Second Edition (updated). The new book covers: new online PHP tools, variables, constants, arrays.

LanguageEnglish
PublisherAdam Majczak
Release dateFeb 22, 2015
ISBN9781311262943
Introduction to PHP, Part 1, Second Edition

Read more from Adam Majczak

Related to Introduction to PHP, Part 1, Second Edition

Related ebooks

Programming For You

View More

Related articles

Reviews for Introduction to PHP, Part 1, Second Edition

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    Introduction to PHP, Part 1, Second Edition - Adam Majczak

    Introduction to PHP

    Part I

    Adam Majczak

    C. Adam Majczak, 2015, All Rights Reserved

    Smashwords: Second English Edition

    (improved and updated)

    E-Edition, License Notes

    This e-book is licensed for your personal use only. This e-book may not be re-sold or given away to others. To share this book with another person, please purchase an additional copy for each recipient.

    While every precaution has been taken in the preparation of this book, the publisher and the author assume no responsibility for errors or omissions, or for damages resulting from any use of the information contained herein.

    ENGLISH EDITION

    CONTENTS:

    Why IT books should be updated?

    CHAPTER 1: Introduction to the e-book edition

    What is PHP?

    What is a PHP File?

    How to install a PHP interpreter?

    How to test local configuration?

    How to use PHP based on Command Line Interface (CLI)?

    How to run PHP on a remote server?

    Compileonline.com: PHP Page vs. PHP Web View Page

    Text output – codepad.org

    Embedding PHP

    Comments in PHP and including files

    CHAPTER 2: PHP variables and constants

    Variable names and values

    Case sensitivity

    Error messages and warnings

    Data types in PHP

    Using constants in PHP

    Integer data type

    Floating-point numbers

    Bool type (Boolean values)

    Null type variable and type checking in PHP

    Dynamic variables

    CHAPTER 3: Operators

    Arithmetic operators

    Assignment operator and combined operators

    Comparison operators

    Logical operators

    Type cast forcing

    Conditional statements (preview)

    Base converting functions and bitwise operators

    Operator precedence

    The ternary operator

    CHAPTER 4: PHP Arrays at a glance

    Numeric indexed arrays, runtime array size change

    Associative arrays

    How to add new key => value pairs to associative arrays?

    How to format output data?

    Why IT books should be updated?

    Since 2013 PHP was improved and updated. In this new (improved and updated) edition I am using some new tools available online. Code examples are also checked, updated and improved. This edition includes also new PHP features (for example: generators) to become more complete and more recent.

    CHAPTER 1: Introduction to the e-book edition

    What is PHP?

    PHP is like C and C++, but interpreted (not compiled) server-side universal programming language (named also the server scripting language) used for dynamic websites and interactive web applications. PHP codes as input produce HTML as output. The PHP script is executed on the server, and the plain HTML result is sent back to the browser. Users do not need to install any additional software to be able to view PHP generated web pages. All being required is that the web server has PHP installed in order to interpret PHP scripts.

    What is a PHP File?

    * PHP files can contain text, HTML, CSS, JavaScript, and PHP code.

    * PHP codes are executed on the server, and the result is returned to the client’s browser as a plain HTML.

    * PHP files have as default extension *.php (* = file name, php = extension).

    * So named pure PHP files contain PHP codes only (without HTML, JavaScript, nor CSS).

    In contrast with static HTML sites, PHP sites are dynamically generated. Instead of the site containing a large number of static HTML files, a PHP-based site may consist of only a

    Enjoying the preview?
    Page 1 of 1