Apprendre PHP (6/19) - Les chaînes de caractères

26 Feb 2019 · 16 min
15:30

In this French‑language tutorial, the instructor walks through the most commonly used PHP string functions and related concepts. Starting with a simple HTML form that captures a text input, he demonstrates how to retrieve the submitted value via $POST and then applies a series of functions to the variable $result. The lesson covers measuring string length with strlen, changing case with strtoupper, strtolower and ucfirst, extracting parts of a string with substr, automatically escaping special characters using addslashes and reversing the process with stripslashes, trimming whitespace via trim and visualising the effect with strreplace, removing HTML tags with strip_tags and safely encoding them with htmlentities. He explains ASCII code conversion using ord and chr, shows how to generate a table of characters and their codes by iterating over a string, introduces the Heredoc syntax for defining large multi‑line string literals without manual escaping, and finally presents dynamic variable names (variable variables) and the constraints on their identifiers. Throughout, he highlights security considerations such as escaping input for database storage and preventing HTML injection. The tutorial is instructional, code‑driven, and emphasizes practical usage of each function.

Chapters

More from Yamossoun

8:56
youtube.com

Compteur synchrone - Logique séquentielle

2w ago
11:58
youtube.com

Compteur asynchrone et diviseur de fréquence - Logique séquentielle

3w ago
11:37
youtube.com

Les registres (parallèle et à décalage) - Logique séquentielle

1mo ago
6:14
youtube.com

Bascule T (Toggle) - Logique séquentielle

1mo ago
12:05
youtube.com

Bascule JK - Logique séquentielle

1mo ago
9:17
youtube.com

Bascule D flip-flop active sur front montant - Logique séquentielle

1mo ago
10:08
youtube.com

Bascule D Latch - Logique séquentielle

1mo ago
8:13
youtube.com

Bascule RS - Logique séquentielle

1mo ago
5:04
youtube.com

Logique séquentielle - Introduction

2mo ago
1:15
youtube.com

Le codeur - Logique combinatoire #codeur #logique #circuit #booleanlogic

2mo ago
1:56
youtube.com

Algorithme de calcule de la racine carrée par dichotomie #dichotomy #squareroot #algorithm

3mo ago
See all content