[PHP] if dans concaténation
analog101
Messages postés
173
Date d'inscription
Statut
Membre
Dernière intervention
-
Reivax962 Messages postés 3742 Statut Membre -
Reivax962 Messages postés 3742 Statut Membre -
Bonjour,
Est il possible d'insérer un IF dans une un concaténation entre un <td></td> ?
De façon à ce que dasn l exemple ci-dessous :
(($test_details['simple_id'] || $test_details['double_id']) ? '<br>[ <a href="....">' . MSG_HELLO . '</a> ]' : '') .
ne s'affiche que si
$test_link ==0
cela me fait une erreur.
merci.
' <td class="c"><a align="absmiddle" href="' . $test_link . '">' . $test_details['name'] . '</a> ' .
IF ($test_link ==0)
{
(($test_details['simple_id'] || $test_details['double_id']) ? '<br>[ <a href="....">' . MSG_HELLO . '</a> ]' : '') .
}
. $test2 . ' </td>'.
Est il possible d'insérer un IF dans une un concaténation entre un <td></td> ?
De façon à ce que dasn l exemple ci-dessous :
(($test_details['simple_id'] || $test_details['double_id']) ? '<br>[ <a href="....">' . MSG_HELLO . '</a> ]' : '') .
ne s'affiche que si
$test_link ==0
cela me fait une erreur.
merci.
' <td class="c"><a align="absmiddle" href="' . $test_link . '">' . $test_details['name'] . '</a> ' .
IF ($test_link ==0)
{
(($test_details['simple_id'] || $test_details['double_id']) ? '<br>[ <a href="....">' . MSG_HELLO . '</a> ]' : '') .
}
. $test2 . ' </td>'.
A voir également:
- [PHP] if dans concaténation
- Easy php - Télécharger - Divers Web & Internet
- Expert php pinterest - Télécharger - Langages
- If exist ✓ - Forum Autoit / batch
- Php alert - Forum PHP
- Retour a la ligne php ✓ - Forum PHP