Overview
Intro
PHP Informatieen HTML
<?PHP phpinfo();
Comments
Data types
FormVariabelen
<formMath
method='POST'>Arrays
<h2>PleaseAssociative inputArrays
yourControl name:</h2>Structures
<inputit type="text"- name="name">then <input-else
type="submit"comparison value="Submitand Name">logic </form>operators
<?phpswitch
$namewhile
=for
$_POST['name'];foreach
echoFunctions
"<h3>functions
Helloparameters
$namereturn </h3>";values
?>
Scope (Global v Local)
Constants
Build in functions
math
string
array
date
Forms
Database PDO
PHP Web
post and get super global
$_SERVER special variables_server
<?
echo "Your User Agent is :" . $_SERVER ['HTTP_USER_AGENT'];
isset() met $_SERVER variableSessions
<?php
if (!empty($_SERVER['HTTPS']))
{
echo 'https is enabled';
}
Tabel HTML met variabelen
<?php
$a=1000;
$b=1200;
// TODO: zet hier een variable $c en geeft die een waarde 1400
echo "<table border=1 cellspacing=0 cellpading=0>
<tr> <td><font color=blue>Salary of Mr. A is</td> <td>$a$</font></td></tr>
<tr> <td><font color=blue>Salary of Mr. B is</td> <td>$b$</font></td></tr>
// TODO: maak hier de derde regel in de tabel met de kolom Mr."C" en waarde van $c
</table>";
?>
OOP