Slide error when inserting php code

0

I'm doing a video slide and everything was fine until I put the php code behind the database videos that I enter through the admin.

When I change the code below:

<div>
    <div u="player">
       <iframe pHandler="ytiframe" pHideControls="0" width="640" height="381" style="z-index: 0;" url="https://www.youtube.com/embed/JZLDb_cPMZY?enablejsapi=1&version=3&playerapiid=ytplayer&fs=1&wmode=transparent" frameborder="0" scrolling="no"></iframe>
    </div>
</div>

For this other code:

<?php
    $busca = mysql_query("SELECT * FROM usuarios  ORDER BY nome ASC");
       while ($resultado = mysql_fetch_array($busca)){
          echo "<div>
                   <div u='player'>
                     <iframe pHandler='ytiframe' pHideControls='0' width='640' height='381' style='z-index: 0;' url='".$resultado['video']."'?enablejsapi=1&version=3&playerapiid=ytplayer&fs=1&wmode=transparent' frameborder='0' scrolling='no'></iframe>
                    </div>
                </div>";
            } ?>

It brings the videos from the database but two strange things happen. The first is that the video that came with that initial image of when loaded comes black and the second, is that before, if I was watching a video and clicks on next or prev paused the video, but now is no longer pausing, if someone can help me the error is there in this block of php when I change but I am not seeing.

    
asked by anonymous 06.06.2015 / 04:37

1 answer

0

Invert double quotes into simple ones, see if it works.

echo '<div>
          <div u="player">
              <iframe pHandler="ytiframe" pHideControls="0" width="640" height="381" style="z-index: 0;" url="'.$resultado['video'].'?enablejsapi=1&version=3&playerapiid=ytplayer&fs=1&wmode=transparent" frameborder="0" scrolling="no"></iframe
          </div>
      </div>';

It's a try ...

    
06.06.2015 / 18:27