title: PHP displays only one word from MySQL record in URL variable
body: <p>A PHP page displays only one word from a MySQL record in a URL variable, while it displays the correct 2 words in the HTML output, I tried many solutions such <code>'&quot;.$row['book_category'].&quot;'</code> and <code>{$row['book_category']}</code> etc. but I still get the same one result.</p>
  <pre class="lang-php prettyprint-override"><code>&lt;?php
      foreach($conn-&gt;query('SELECT book_category, COUNT(*) FROM books GROUP BY book_category') as $row) {
          echo &quot;&lt;tr&gt;&quot;;
          echo &quot;&lt;td&gt;&quot; . &quot;&lt;a href=&quot; . &quot;sidebar_cat_display.php?book_cat=&quot; . $row['book_category'] . &quot;&gt;&quot; . $row['book_category'] . &quot;&lt;/a&gt;&quot; . &quot;&lt;/td&gt;&quot;;
          echo &quot;&lt;/tr&gt;&quot;; 
      }
  ?&gt;
  </code></pre>
  <p>So now first <code>$row</code> insert is only one word in the url, while the second <code>$row</code> outputs two words properly as expected; the problem is I need the two words to be passed as variable in the URL.</p>