Variable php et lecteur

Résolu/Fermé
didy_gwatinik Messages postés 352 Date d'inscription samedi 17 novembre 2007 Statut Membre Dernière intervention 30 mars 2010 - 1 déc. 2008 à 23:21
didy_gwatinik Messages postés 352 Date d'inscription samedi 17 novembre 2007 Statut Membre Dernière intervention 30 mars 2010 - 2 déc. 2008 à 00:07
Bonjour,
Je voudrai mettre un lecteur sur mon site internet mais en fait dans mon src="" je voudrai mettre une variable php mais ca ne marche pas pourtant le contenu de ma variable existe bien.
Comme ceci ça marche : <embed src="BA2.mp4" height="250" width="310">
mais comme ca :
$nomVideo="BA2.mp4";
<embed src="$nomVideo" height="250" width="310">
ca ne marche pas
Quelqu'un peut-il m'aider?
A voir également:

1 réponse

zoby44 Messages postés 818 Date d'inscription vendredi 3 novembre 2006 Statut Membre Dernière intervention 7 avril 2010 199
1 déc. 2008 à 23:29
Salut, essaye avec :

<?php
$nomVideo="BA2.mp4"; 
echo '<embed src="'.$nomVideo.'" height="250" width="310">';
?>


ou :
<?php
$nomVideo="BA2.mp4";
?>

<embed src="<?php echo $nomVideo;?>" height="250" width="310">
1
didy_gwatinik Messages postés 352 Date d'inscription samedi 17 novembre 2007 Statut Membre Dernière intervention 30 mars 2010 80
2 déc. 2008 à 00:07
Les 2 marches c'est parfait
merci énormément!!
Bonne soirée
0