title: get all variables in bash and convert to a url query string
body: <p>I need to get all the variables set in a bash script and turn it into a query string.  What I need to do is pass all the variables that have been created in the bash script to a php file.  The variable are some times set and sometimes not as well as the amount of them is a lot of them.  </p>
  
  <pre><code>#!/bin/bash
  
  id=19
  url="http://domain.com"
  #this var should be generated 
  query='id=19&amp;url=http://domain.com'
  php /srv/install-post.php -- $query
  </code></pre>