Skip to content

dynamo3/php-Fundamentals

Repository files navigation

PHP Fundamentals

Primitives (atomic values) Variable Interpolation (Double quotes vs single quotes) Some Native Functions to PHP Escaping Output: htmlentities() nl2br()

Objectives

  • Identify a PHP page
  • Construct a PHP page
  • Show how to create a variable
  • Demonstrate an if/else statement in PHP
  • Deomonstrate an if/elseif/else in PHP
  • Demonstrate a switch statement in PHP

Overview

  • PHP is a programming language.
    • Evaluate form data from browswer
    • talk to database
    • looks like HTML
  • PHP basics
    • echo
    • variables
    • comments
    • comparisons
    • Conditions
  • Primatives
  • arrays
  • variable interpolation

PHP is a Language

  • Serverside

PHP Basics

Comparison

  • > Greater than
  • < Less than
  • <= Less than or equal to
  • >= Greater than or equal to
  • == Equal to
  • != Not equal to

Control Flow

  • if/else Handle two conditions
  • if/elseif/else Can handle more than two conditions
  • switch multiple options based on value of variable

Arrays

  • Same as before, different syntax

Homework

  • Add tasks by clicking the mouse instead of pressing ENTER
  • Add tasks when the user clicks on the letter J
  • Bonus: Bold the text inside the new task. I.e. <li><b>New Task</b></li>
  • Bonus: Add a delete button to remove a tasks
  • Bonus: Add a button to remove all list items

Rescources

About

Introduction to PHP, a server side scripting language.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors