[PHP/MYSQL] Echo dans un echo
Résolu
Digit@lChord
Messages postés
129
Date d'inscription
Statut
Membre
Dernière intervention
-
Autumn`Tears Messages postés 1054 Date d'inscription Statut Membre Dernière intervention -
Autumn`Tears Messages postés 1054 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
Je cherche a mettre des données mysql dans un tableau tout en réalisant des if dans ce tableau.
Donc logiquement j'ai fait quelque chose comme sa :
Sauf que non, sa marche pas, je comprend absolument pas pourquoi.
Et j'ai droit a un "Parse error: syntax error, unexpected T_IF in /public_html/xx/index.php on line 52"
Merci d'avance
Je cherche a mettre des données mysql dans un tableau tout en réalisant des if dans ce tableau.
Donc logiquement j'ai fait quelque chose comme sa :
$base = mysql_connect ('xxx', 'xxx', 'xxx'); mysql_select_db ('xxx', $base) ; $sql = 'SELECT * FROM ORDER BY id DESC'; $req = mysql_query($sql) or die('Erreur SQL !<br />'.$sql.'<br />'.mysql_error()); while ($data = mysql_fetch_array($req)) { echo '<tr><td>'.$data['Id'].'</td>'; echo '<td>'.$data['Name'].'</td>'; echo '<td>'.$data['Status'].'</td>'; echo '<td>'.$data['Type'].''; echo if($data['Type'] == Type1) { echo'(Warning)'; } else { }; <- ligne 52 echo '</td></tr>'; } mysql_free_result ($req);
Sauf que non, sa marche pas, je comprend absolument pas pourquoi.
Et j'ai droit a un "Parse error: syntax error, unexpected T_IF in /public_html/xx/index.php on line 52"
Merci d'avance
A voir également:
- [PHP/MYSQL] Echo dans un echo
- Echo discord - Forum Casque et écouteurs
- @Echo off - Forum Virus
- Problème echo fichier .bat ✓ - Forum Windows 7
- Echo lors d'un appel samsung - Forum Mobile
- Probleme echo en appel - Forum Samsung