A voir également:
- Afficher chaine php
- Afficher chaine php ✓ - Forum - PHP
- Afficher erreur php - Conseils pratiques - PHP
- Afficher json php ✓ - Forum - Webmaster
- Afficher en php - Articles
- Afficher image php ✓ - Forum - PHP
3 réponses
ZeNairolf
- Messages postés
- 1688
- Date d'inscription
- vendredi 6 mars 2009
- Statut
- Membre
- Dernière intervention
- 24 septembre 2018
Ton echo ne fonctionne pas? Et pourquoi +1 à la fin.
yg_be
- Messages postés
- 14016
- Date d'inscription
- lundi 9 juin 2008
- Statut
- Contributeur
- Dernière intervention
- 25 janvier 2021
Et ainsi?
<?php // Génération d'une chaine aléatoire function chaine_aleatoire($nb_car) { $chaine = 'azertyuiopqsdfghjklmwxcvbn123456789'; $nb_lettres = strlen($chaine) - 1; $generation = ''; for($i=0; $i < $nb_car; $i++) { $pos = mt_rand(0, $nb_lettres); $car = $chaine[$pos]; $generation .= $car; } return $generation;} echo chaine_aleatoire(8); ?>