Code Afficher les notifications

Fermé
Kotestg Messages postés 15 Date d'inscription lundi 2 juillet 2018 Statut Membre Dernière intervention 21 août 2018 - Modifié le 21 août 2018 à 06:49
jordane45 Messages postés 38136 Date d'inscription mercredi 22 octobre 2003 Statut Modérateur Dernière intervention 16 avril 2024 - 21 août 2018 à 08:39
Bonjour tout le monde

Voici un code que j'ai écrit pour afficher les notifications

friend_request_sent.php

<a href="profile.php?id=<?= $notification->user_id ?>">
    <img src="<?= $notification->avatar ? $notification->avatar : get_avatar_url\
($notification->email, 40) ?>" alt="Image de profil de <?= e($notification->pseu\
do) ?>" class="avatar-xs">
    <?= e($notification->pseudo) ?>
</a>
vous a envoyé une demande d'amitié <span class="timeago" title="<?= $notificatio\
n->created_at ?>"><?= $notification->created_at ?></span>.
<a class="btn btn-primary" href="accept_friend_request.php?id=<?= $notification-\
>user_id ?>">Accepter</a>
<a class="btn btn-danger" href="delete_friend.php?id=<?= $notification->user_id \
?>">Refuser</a>


Mais j'ai cette erreur

Parse error: syntax error, unexpected '(', expecting identifier (T_STRING) in C:\wamp64\www\forum\partials\notifications\friend_request_sent.php on line 3

Vraiment aidez moi s'il vous plaît.

Edit: correction des balises de code
A voir également:

1 réponse

jordane45 Messages postés 38136 Date d'inscription mercredi 22 octobre 2003 Statut Modérateur Dernière intervention 16 avril 2024 4 649
21 août 2018 à 06:50
Bonjour

get_avatar_url\ ?
Que vient faire cet anti slash ?
0
jordane45 Messages postés 38136 Date d'inscription mercredi 22 octobre 2003 Statut Modérateur Dernière intervention 16 avril 2024 4 649
21 août 2018 à 08:39
PS: Pour poster ton code correctement sur le forum :
https://codes-sources.commentcamarche.net/faq/11288-les-balises-de-code
0