title: using php to add div class property
body: <p>I am using WAMP. I want to take background image URL from my database and want to show this in div class 'box'. I tried it by followed way but couldn't succeed. the last background image is appearing on each box while I want to show different images. Code I am using is  </p>
  
  <pre><code>&lt;?php 
      $feild_set = get_all_feilds();
      while($feild = mysql_fetch_array($feild_set)) { 
          $url = $feild['background_image_url'];
          echo "&lt;style&gt;
              .box { 
                  width: 300px ;
                  height: 100px;
                  background-image: $url;
                  background-visibility: visible;
                  border: 1px #00FF33;
                  margin-bottom: 10px;
                  display: inline-table;
                  margin-right: 10px;
              }
              &lt;/style&gt;";
          echo "&lt;div class=\"box\"&gt;";
          echo "&lt;a href=\"content.php?feild=" . $feild['id'] . "\" &gt;&lt;block_holder&gt;{$feild['menu_name']}&lt;/block_holder&gt;&lt;/a&gt;"; 
          echo "&lt;/div&gt;";
      }
  ?&gt;
  </code></pre>
  
  <p>Thanx in advance</p>