title: how to pass variable as the $_POST on php
body: <p>My code is don't runnig. how to pass variable as the $_POST on php . Or is it not possible?</p>
  
  <p>original code</p>
  
  <pre><code>foreach ($ret[0]-&gt;trends as $topic) {
                              $a = $topic-&gt;name;
                              $a = preg_replace("'", " ", $a);
                              $i++;
                                    echo "
                                      &lt;tr&gt;
                                        &lt;td class='hidden-xs'&gt;$i&lt;/td&gt;
                                        &lt;td&gt;$topic-&gt;name&lt;/td&gt;
                                        &lt;td&gt;&lt;form role='form' action='/trgy/follow.php' method='get'&gt;
                                        &lt;input type='text' name='$a' placeholder='follow number' &gt;
                                        &lt;input type='submit' value='Follow'&gt;&lt;/form&gt;
                                        &lt;/td&gt;
                                      &lt;/tr&gt;";
  
                                    $count = htmlspecialchars($_POST[$a]);
                                    if (!empty($_GET[$topic-&gt;name])) {
                                      $ret1 = $topic-&gt;name;
                                      $lasttweets = $connectionOauth-&gt;get('search/tweets', array('q' =&gt; $ret1, 'count' =&gt; $count));
  
                                  }
                                }
  </code></pre>
  
  <p>don't run - this Problematic lines - I can not count</p>
  
  <pre><code>$a = $topic-&gt;name;
  &lt;input type='text' name='$a' placeholder='Number' &gt;
  $count = htmlspecialchars($_POST[$a]);
  </code></pre>