database - How do I apply my php code to a bootstrap code? -


i trying display database on bootstrap bar , have no idea how combine or implement two. ive made bootstrap html's file .php, correct thing do? here's code (ignore filler words)

<ul class="nav nav-list well">          <li class="nav-header"></li>         <li class="active"><a href="#">hit info</a></li>         <li><a href="#">linky link</a></li>         <li class="divider"></li>         <li><a href="#">another hit info</a></li>         <li><a href="#">another linky link</a></li>         <li class="divider"></li>         <li><a href="#">yet hit</a></li>         <li><a href="#">aaaaand link</a></li>      </ul> 

and php want include (the code making want display in file)

<?php include 'one.php'; ?> 

where "linky link" is, want display didnt seem work when put php right there. thing want when link database gets displayed, displays bootstrap button. tried , not sure how implement php code in bootstrap code.

print " <td>".$row['link'] . "</td></tr> "; 

how add bootstrap code when link database gets displayed, gets displayed button

<a href="#"  class="btn btn-primary btn-large"><i class="icon-heart icon-white"></i>do hit!</a> 

your code seems right me except "<td> , <tr>" tag. you're not using right. try approach

in one.php

<?php   $links = array( 0 => array("url"=>"http://google.com","text"=>"google") );  ?> 

in menu

<?php include('one.php')?> <ul> <li><a href="">menu one</a></li> <?php foreach( $links $link){ ?> <li><a href="<?php print $link['url']?>"><?php print $link['text']?></li> <?php } ?> </ul> 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -