La fonction PhP strtoupper()
| Description | La fonction PhP strtoupper() permet de renvoyer une chaîne en majuscule (ne prend pas en compte les caractères accentués : é, à, î, ...). |
|---|---|
| Publicité | |
| Solution | <? $chaine="Voici La ChaIne que je VEUX mettre en MaJuScUlE."; // Appel de la fonction strtoupper() $nouvellechaine=strtoupper($chaine); // Affichage des deux chaînes echo "$chaine<br />devient :<br />$nouvellechaine"; /* Voici La ChaIne que je VEUX mettre en MaJuScUlE. devient : VOICI LA CHAINE QUE JE VEUX METTRE EN MAJUSCULE. */ ?> |
| Notez la solution |
|
| Questions similaires | La fonction PhP strtolower() La fonction PhP ucfirst() |
| Mots clés | strtoupper, php, fonction, majuscule, strtolower |