Hello, j'ai un petit soucis.
Voici mon code qui affiche un tableau html depuis le résultat d'une requête SQL :
$result = mysqli_query($link, "SELECT * FROM Offres ORDER BY idoffre DESC");
echo '<table><tr>';
echo '<td style="font-weight:bold;border-bottom:1px solid black;text-align:center;">Pseudo</td><td style="font-weight:bold;border-bottom:1px solid black;text-align:center;">Type</td><td style="font-weight:bold;border-bottom:1px solid black;text-align:center;">Possède</td><td style="font-weight:bold;border-bottom:1px solid black;text-align:center;">Achète</td><td style="font-weight:bold;border-bottom:1px solid black;text-align:center;">Taux</td><td style="font-weight:bold;border-bottom:1px solid black;text-align:center;">Univers</td><td style="font-weight:bold;border-bottom:1px solid black;text-align:center;">Date</td><td style="font-weight:bold;border-bottom:1px solid black;text-align:center;">ID</td><tr>';
while($row = mysqli_fetch_array($result))
{
echo '<td style="text-align:center;">'.$row['identifiant'].'</td><td style="text-align:center;">'.$row['type'].'</td><td style="text-align:center;">'.$row['montantpossede'].'</td><td style="text-align:center;">'.$row['montantachete'].'</td><td style="text-align:center;">'.$row['taux'].'</td><td style="text-align:center;">'.$row['univers'].'</td><td style="text-align:center;">'.$row['date'].'</td><td style="text-align:center;">'.$row['idoffre'].'</td><tr>';
}
echo '</table><tr>';
Oui je sais le style est vite fait j'avais la flemme de passer par une feuille css mais c'est pas le problème 
Je souhaiterais appeler une fonction php dans chaque case d'une certaine colonne, voici un schéma :
http://i.imgur.com/MwMYSUk.png
Je veux appliquer ma fonction php troncature_date sur chaque case se trouvant dans la colonne 'Date'.
Merci pour votre aide.
Je ne veux pas reformuler la date dans la BDD SQL, je dois absolument passer par la fonction
Message édité le 05 janvier 2016 à 19:41:55 par Benekiki