Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Research](https://md.research.elamur.ai/free/en/) · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Shryfti](https://md.shryfti.elamur.ai/free/en/) · [OCR](https://md.ocr.elamur.ai/free/en/)

[Elamur Dictionary](https://md.dictionary.elamur.ai/free/en/) · [this page in HTML](https://dictionary.elamur.ai/free/en/french/php/examples/1/)

[dictionaries](https://md.dictionary.elamur.ai/free/en/) / [French](https://md.dictionary.elamur.ai/free/en/french/) / php

# php

French · noun

## Examples, page 1

[Back to senses and usage](https://md.dictionary.elamur.ai/free/en/french/php/)

- \<?php $lang = strtolower($\_POST\['lang'\]); $isLangFr = $lang === 'fr'; $isLangEn = $lang === 'en'; if ($isLangFr) { echo 'Vous parlez français !'; } elseif ($isLangEn) { echo 'You speak English!'; } else { echo 'Je ne vois pas quelle est votre langue !'; } Ici on teste l'égalité entre $lang et 'fr', mais pas directement dans le if : le test retourne un boolean (c'est-à-dire soit true, soit false) qui est stocké dans la variable $is\_lang\_fr. — [Wikipedia: PHP](https://fr.wikipedia.org/wiki/PHP) (Wikipedia contributors). Licence: [cc-by-sa-4.0](https://creativecommons.org/licenses/by-sa/4.0/). — Mova's open texts (cc-by-sa-4.0)
- \<?php // instructions ?\> — [Wikipedia: Point d'interrogation](https://fr.wikipedia.org/wiki/Point_d%27interrogation) (Wikipedia contributors). Licence: [cc-by-sa-4.0](https://creativecommons.org/licenses/by-sa/4.0/). — Mova's open texts (cc-by-sa-4.0)
- \<?php // la fonction strtolower renvoie en minuscules la chaîne de caractères passée en paramètre $lang = strtolower($\_POST\['lang'\]); if ($lang === 'fr') { echo 'Vous parlez français !'; } elseif ($lang === 'en') { echo 'You speak English!'; } else { echo 'Je ne vois pas quelle est votre langue !'; } Une condition est appliquée quand l'expression entre parenthèses est évaluée à true, et elle ne l'est pas dans le cas de false. — [Wikipedia: PHP](https://fr.wikipedia.org/wiki/PHP) (Wikipedia contributors). Licence: [cc-by-sa-4.0](https://creativecommons.org/licenses/by-sa/4.0/). — Mova's open texts (cc-by-sa-4.0)

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://dictionary.elamur.ai/sitemap.xml) · [llms.txt](https://dictionary.elamur.ai/llms.txt)
