Create your own awesome maps

Even on the go

with our free apps for iPhone, iPad and Android

Get Started

Already have an account?
Log In

PHP by Mind Map: PHP
0.0 stars - 0 reviews range from 0 to 5

PHP

basis

<?php ... ?>

variabelen

$strvar="...";

$intvar=123;

commentaar

//

/* ... *//

strings

$str1="yyy" . "xxx";

echo $str1;

Operatoren

"is gelijk aan"- operatoren

=

+= en -=

*= en /=

%=

.=

logische operatoren

&&

||

!

vergelijkings- operatoren

==

!=

< en >

<= en >=

wiskundige operatoren

+ en -

* en /

%

++ en --

condities

if ($var=="waarde") {...} eslseif ($var=="waarde") {...} else {...}

loops

while ($var<="waarde") {...}

for ($i=1; $i<=10; $i++) {...}

databases

verbinding maken

$con=mysql_connect(“server”, “gebruikersnaam”, “wachtwoord”);

mysql_select_db("database", $con);

records ophalen

$resultaat=mysql_query("SELECT * FROM Tabel"); while($record = mysql_fetch_array($resultaat)) { echo $record['veld1'] . " " . $record['veld2']; }

records invoegen, updaten en deleten

if (!mysql_query($strSQL,$con)) die ('...' . mysql_error());