voici la formule que j'ai mis :
<td width="50"><?php
$liste['cm']= 'oui';
$liste['cm']= str_replace('oui' ,'yes ',$liste['cm']);
echo $liste['cm'];
?>
</td>
merci a vous
<?PHP
$origine = "Oui, je l'aime, Seigneur. Non, je ne vous dirai pas 'oui' lorsque je pense 'non'";
$cible = str_replace ("oui", "yes", $origine);
print "$origine <br />devient <br />$cible";
?>
sort, à juste titre, ceci:<?PHP
$origine = "Oui, je l'aime, Seigneur. Non, je ne vous dirai pas 'oui' lorsque je pense 'non'";
$a_remplacer = array("oui", "Oui");
$remplacants = array("yes", "Yes");
$cible = str_replace ($a_remplacer, $remplacants, $origine);
print "$origine <br />devient <br />$cible";
?>
pour qu'elle remplace les deux Oui et oui, ou utiliser str_ireplace...
<?php
while($liste = mysql_fetch_array($requete))
{ ?>
<table width="895">
<tr>
<td width="171"><?php echo $liste['nom'];?></td>
<td width="116"><?php echo $liste['prenom'];?></td>
<td width="44"><?php echo $liste['ne'];?></td>
<td width="30"><?php echo $liste['sexe'];?></td>
<td width="47"><?php echo $liste['pays'];?></td>
<td width= "58"><?php echo $liste['dept'];?></td>
<td width="291"><?php echo $liste['club'];?></td>
<td width="48"><?php echo $liste['paye'];?></td>
<td width="50"><?php
$liste['cm']= 'oui'; // BOUUUUUUUUUH !
$liste['cm']= str_replace('oui' ,'yes ',$liste['cm']);
echo $liste['cm'];
?>
</td>
</tr>
</table>
<?php } ?>