Results 1 to 3 of 3

Thread: [RESOLVED] Help using mysql_fetch_assoc values inside echo

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2005
    Posts
    1,907

    Resolved [RESOLVED] Help using mysql_fetch_assoc values inside echo

    Hi all. I want to echo the following code:


    HTML Code:
    <td>
    <a href="#" onclick="player=play.open('divbox', 'div', 'videoId', ' Window Title', 'width=450px,height=400px,left=200px,top=150px,resize=1,scrolling=1'); return false;" title="Play This Video"><img src='http://www.somsite.com/default.jpg' /></a>
            <h4>Video title</h4>
            <div id="videoId" style="display: none;">
              <h2>Video title</h2>
                   <object width="400" height="300">
            <param name="movie" value="http://www.youtube.com/v/X86S5oZzzh4&autoplay=1"></param>
            <param name="wmode" value="transparent"></param>
            <embed src="http://www.youtube.com/v/X86S5oZzzh4&autoplay=1" type="application/x-shockwave-flash" 
             wmode="transparent" width="400" height="300" autostart="true"></embed>
          </object>
    
       </div>        
          </td>
    After :
    echo '<td width="' . $colWidth . '%">' .
    But i don't know how use $row['idyoutube'] and $row['thumbnail_url'] inside that block of html.

    I want to replace the followings:

    1)I want to replace videoId with value of $row['idyoutube']

    2)replace video title with $row['title']

    3)replace Window Title with $row['title'] ,

    4) replace end value of http://www.youtube.com/v/ with $row['idyoutube']
    5)replace image source http://www.somsite.com/default.jpg with value of . $row['thumbnail_url'] .

    I be happy if some one show me how i can achive this.Thanks


    php code:

    PHP Code:
    while ($row mysql_fetch_assoc($result)) { 
       if (
    $i $colsPerRow == 0) { 
          
    // start a new row 
          
    echo '<tr>'
       } 

       echo 
    '<td width="' $colWidth '%">' .  

          
    //here i want to output the html block of code 
       
            
    '<br>' $row['title'] . '</a><br />' $row['view_count'] . '|' $row['comment_count'] . '=>Status:' $row['embed_status'] . '</td>'

       if (
    $i $colsPerRow == $colsPerRow 1) { 
          
    // end this row 
          
    echo '</tr>'
       }  

       
    $i += 1


  2. #2
    Hyperactive Member
    Join Date
    Dec 2006
    Location
    Ubuntu Haters Club
    Posts
    405

    Re: Help using mysql_fetch_assoc values inside echo

    I guess this is solved from your other post...??

    If not I don't quite see what you're asking.
    » Twitter: @rudi_visser : Website: www.rudiv.se «

    If Apple fixes security flaws, they are heralded as proactive. If Microsoft fixes a security flaw, they finally got around to fixing their buggy OS.

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2005
    Posts
    1,907

    Re: Help using mysql_fetch_assoc values inside echo

    Rudvisser yes i figured it out :-). i will mark it az resolved :-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width