title: I have to add a url into a data-url attribute in a button element
body: <p>I have to add a url into a data-url attribute in a button element. But from the url image, I have to add id and book name which are php variables. How can I add this two php variables in my data-url attribute? </p>
  
  <p>This is the URL : <code>http://localhost/book%20store/detail.php?id=53&amp;cat=Game Of Thrones</code>
   This is my code (I've tried this but this is not working):</p>
  
  <pre><code>$book_id = $row['b_id'];  
  $book_name = $row['b_nm'];    
  echo'&lt;table&gt;  
       &lt;tr&gt;  
         &lt;button class="sharer btn btn-lg"   
  data-url="http://localhost/book store/detail.php?id={$book_id}&amp;cat={$book_name}" &gt;
         Share to Facebook &lt;/button&gt;
       &lt;/tr&gt;
        &lt;/table&gt;';
  </code></pre>
  
  <p>from the url : <code>$row['b_id'] = 53</code><br>
            And <code>$row['b_nm']=Game Of Thrones</code></p>