title: How to Concatenate table name with with a variable value in mySQL
body: <p>I'm trying to create a dynamic code that would ready from any table with the certain name but the difference between each table name is a number that is generated by a variable: for example :</p>
  
  <p>//that's how I get my variable the value for example is = 3</p>
  
  <pre><code>$pid = $GLOBALS["localid"];
  </code></pre>
  
  <p>//the table name for example is tablename_3</p>
  
  <pre><code>$strTable = "tablename_" .$pid;
  </code></pre>
  
  <p>//here's how the query should look like</p>
  
  <pre><code>$query = "SELECT * FROM . $strTable . where .....;
  </code></pre>
  
  <p>I'm making a mistake somewhere but can't figure it out and would appreciate a little help please</p>