[php et html] probleme select
JSS
Messages postés
3745
Date d'inscription
Statut
Contributeur
Dernière intervention
-
JSS Messages postés 3745 Date d'inscription Statut Contributeur Dernière intervention -
JSS Messages postés 3745 Date d'inscription Statut Contributeur Dernière intervention -
Bonjour ou Bonsoir,
J'ai un petit probleme d'affichage.
Le code suivant ne m'affiche que le premier element du tableau tab savez-vous pourquoi ?
Merci pour votre aide.
<select name="toto">
<?php
function getInfo()
{
$spec[0]="toto";
$spec[1]="titi";
return $spec;
}
$tab[]=getInfo()
while (list($key,$val) = each($tab))
{
echo "<option value=$key>$val</option>";
}
</select>
Encore merci pour votre aide.
JSS
J'ai un petit probleme d'affichage.
Le code suivant ne m'affiche que le premier element du tableau tab savez-vous pourquoi ?
Merci pour votre aide.
<select name="toto">
<?php
function getInfo()
{
$spec[0]="toto";
$spec[1]="titi";
return $spec;
}
$tab[]=getInfo()
while (list($key,$val) = each($tab))
{
echo "<option value=$key>$val</option>";
}
</select>
Encore merci pour votre aide.
JSS
A voir également:
- [php et html] probleme select
- Editeur html - Télécharger - HTML
- Easy php - Télécharger - Divers Web & Internet
- Please select boot device - Forum Matériel & Système
- Espace html - Astuces et Solutions
- Br html ✓ - Forum Webmastering
1 réponse
Bonjour ou Bonsoir,
C'était juste un probleme de declaration.
La réponse à mon problème ici :
http://www.commentcamarche.net/forum/affich-764392-%5Bphp%5D-boucle-sur-un-tableau
JSS
C'était juste un probleme de declaration.
La réponse à mon problème ici :
http://www.commentcamarche.net/forum/affich-764392-%5Bphp%5D-boucle-sur-un-tableau
JSS