i wanna test if my variable is empty or not to display some differents things. When i don't use the else...if everything work but when i use this code :
<?php
$Amazon = get_post_meta($post->ID, "Lien Amazon", true);
?>
<?php
if( $Amazon != NULL ){
echo '<li><span class="post-meta-key"><a href=". $Amazon . ">Acheter sur Amazon</a></li>' ;}
else {
echo '<li><span class="post-meta-key"><a href="https://www.amazon.fr/bd/b?ie=UTF8&node=301133">Acheter sur Amazon</a></li>' ;}
?>
What is the problem ? Thank you