Curabitur blandit tempus porttitor. Vestibulum id ligula porta felis euismod semper. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Curabitur blandit tempus porttitor. Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.
Curabitur blandit tempus porttitor. Vestibulum id ligula porta felis euismod semper. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Curabitur blandit tempus porttitor. Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.
Egestas
💡
Curabitur blandit tempus porttitor. Vestibulum id ligula porta felis euismod semper. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Curabitur blandit tempus porttitor. Aenean lacinia bibendum nulla sed consectetur.
Een simpele OOP CRUD* applicatie maken.
Combinatie van Frontend en backend.
* CRUD = Create / Update / Delete
Bij Basic Web Development leer je de basisprincipes van nieuwe programmeertalen. Het is belangrijk om in deze fase bewust om te gaan met het gebruik van AI-tools. Te veel AI-gebruik kan je leerproces negatief beïnvloeden. Door vooral te copy-pasten in plaats van zelf te begrijpen wat je doet, loop je het risico vast te lopen in je verdere ontwikkeling binnen dit vakgebied. Wij geloven in het stapsgewijs leren omgaan met AI:
Hoewel AI-gebruik niet letterlijk wordt verboden, raden we sterk aan om in dit vak zelf de uitdaging aan te gaan en zo weinig mogelijk rechtstreeks code van AI over te nemen. Let op: de eindevaluatie is zodanig opgesteld dat overmatig AI-gebruik eerder een nadeel dan een voordeel zal zijn.
<div>
<h1>Hello World</h1>
</div>
<div>
<div>
<section class="intro-section">
<h3>Welcome to our website!</h3>
</section>
</div>
</div><form>
<label for="first_name">Voornaam</label>
<input type="text" name="first_name" id="first_name">
<label for="last_name">Achternaam</label>
<input type="text" name="last_name" id="last_name">
<button>Submit</button>
</form><section class="dashboard">
<h1>Welkom op je dashboard</h1>
<h2>Dit is het dashboard van: 'de voornaam'</h2>
<h3>Jouw favoriete films zijn:</h3>
<ul class="movies">
<li>Dynamische film 1</li>
<li>Dynamische film 2</li>
<li>Dynamische film 3</li>
</ul>
</section><h1>
Hello World!
</h1><?php
echo 'Hello World from PHP';WINDOWS
MAC
Editor (= Veredelde notepad)
IDE (Integrated Development Environment)
<?php?>Als er niets meer volgt na uw PHP code is het de gewoonte van geen sluit tag te gebruiken.
<?php
phpinfo();<?php
echo 'Deze tekst komt in de browser';<?php
$x = 1;
$y = 'test';
$1Test; // Invalid<?php
$myTestVariable = "This is a text with doublequotes";
$anotherTestVariable = 'This is a text with singlequotes';<?php
$firstname = 'Joske';
$lastname = 'Vermeulen';
echo 'Your full name is: '. $firstname .' '. $lastname;
echo "Your full name is: {$firstname} {$lastname}";
$fullname = 'Sam';
$lastname = 'Serrien';
$fullname .= $lastname;
<?php
$myFirstNumberVariable = 34;
$mySecondNumberVariable = 44;
$someOtherVariable = 1.33;
$somerOtherOtherVariable = 35.77;<?php
$x = 3;
$x = 2;
echo $x - $y; // 1
echo $x + $y; // 5
echo $x * $y; // 6
echo $x / $y; // 1.5
echo $x % $y; // 1
echo $x ** $y; // 9| Operator | Same as |
|---|---|
$x += $y |
$x = $x + $y |
$x -= $y |
$x = $x - $y |
$x *= $y |
$x = $x * $y |
$x /= $y |
$x = $x / $y |
$x %= $y |
$x = $x % $y |
| Operator | What |
|---|---|
++$x |
$x + 1 and return x |
$x++ |
return $x and $x + 1 |
--$x |
$x - 1 and return $x |
$x-- |
return $x and $x - 1 |
🤯 right?
<?php
$x = 5;
$y = --$x;
echo $y; // $y = 4
echo $x; // $x = 4
$x = 5;
$y = $x--;
echo $y; // $y = 5
echo $x; // $x = 4
<?php
$isAllowed = false;
$isAdmin = true;
$validated = true;
$inherited = false;<?php
$teachers = ['Alessandro', 'Sam', 'Bram', 'Kevin'];
$teachers = array('Alessandro', 'Sam', 'Bram', 'Kevin');
$teachers[0]; // Alessandro
$teachers[1]; // Sam
$teachers[2]; // Bram
$points = [5, 9, 11, 10, 19, 18];
$points = array(5, 9, 11, 10, 19, 18]);<?php
$a = null;<?php
// This is a single line
/*
* Block comment
* Multiple lines
*/<?php
$isCool = true;
if($isCool) {
echo 'Yes, it is!';
}<?php
$isCool = true;
if($isCool) {
echo 'Yes, it is!';
} else {
echo 'Nope, it is not...';
}<?php
$position = 3;
if($position === 1) {
echo 'First postition';
} elseif($position === 2) {
echo 'Second position';
} else {
echo 'Some position';
}| Operator | What |
|---|---|
== |
Values are equal |
=== |
Values and types are equal |
!= |
Values are not equal |
<> |
Values are not equal |
!== |
Values and types are not equal |
> |
Great than |
< |
Less than |
>= |
Greater or equal to |
<= |
Less than or equal to |
<=> |
Spaceship (< -1 | = 0 | > +1) |
<?php
$x = 1;
$y = 2;
$x <=> $y; // < 0
$x = 2;
$y = 1;
$x <=> $y; // > 0
$x = 1;
$y = 1;
$x <=> $y; // = 0<?php
$momentOfDay = 'morning';
switch($momentOfDay) {
case 'morning': {
echo 'Good morning';
}break;
case 'noon': {
echo 'Bon appetit!';
}break;
case 'evening': {
echo 'Good evening!';
}break;
default: {
echo 'Hello';
}
}<?php
$x = 1;
while($x < 10) {
echo $x;
$x++;
}<?php
$x = 1;
do {
echo $x;
$x++;
} while($x < 10)<?php
for($i = 1; $i <= 10; $i++) {
echo $i;
}<?php
for($i = 1; $i <= 10; $i++) {
if($i === 2) {
continue;
}
echo $i;
}Output: 1, 3, 4, ...
<?php
for($i = 1; $i <= 10; $i++) {
if($i === 2) {
break;
}
echo $i;
}Output: 1
<?php
$teachers = ['Alessandro', 'Sam', 'Bram'];
for($i = 0; $i <= count($teachers); $i++) {
echo $teachers[$i];
}Output: Alessandro Sam Bram
<?php
$teachers = ['Alessandro', 'Sam', 'Bram'];
foreach($teachers as $teacher) {
echo $teacher;
}Output: Alessandro Sam Bram
<?php
$teachers = ['Alessandro', 'Sam', 'Bram'];
foreach($teachers as $key => $teacher) {
echo $key;
echo $teacher;
}Output: 0Alessandro 1Sam 2Bram
<?php
$teachers = ['Alessandro', 'Sam', 'Bram'];
$teachersAndLaptops = [
'Alessandro' => 'Mac',
'Sam' => 'Mac',
'Bram' => 'Windows',
];⚠️ Key is uniek!
<?php
$teachersAndLaptops = [
'Alessandro' => 'Mac',
'Sam' => 'Mac',
'Bram' => 'Windows',
];
foreach($teachersAndLaptops as $teacher => $laptop) {
echo "The laptop from {$teacher} is a {$laptop}";
}<?php
$teachersAndLanguages = [
'Alessandro' => ['PHP', 'HTML', 'JS', 'CSS'],
'Sam' => ['PHP', 'HTML'],
'Bram' => ['JS', 'CSS'],
];<?php
$teachersAndLanguages = [
'Alessandro' => ['PHP', 'HTML', 'JS', 'CSS'],
'Sam' => ['PHP', 'HTML'],
'Bram' => ['JS', 'CSS'],
];
foreach($teachersAndLanguages as $teacher => $languages) {
echo "<h2>{$teacher}</h2>";
echo "<ul>";
foreach($languages as $language) {
echo "<li>{$language}</li>";
}
echo "</ul>";
}<?php
$teachersAndLanguages = [
'Alessandro' => ['PHP', 'HTML', 'JS', 'CSS'],
'Sam' => ['PHP', 'HTML'],
'Bram' => ['JS', 'CSS'],
];
foreach($teachersAndLanguages as $teacher => $languages) {
echo '<h2>'.$teacher.'</h2>';
echo '<ul>';
foreach($languages as $language) {
echo '<li>'.$language.'</li>';
}
echo '</ul>';
}in_array()array_key_exists()isset()count()explode()implode()empty()