title: WordPress post views from the_views as a variable
body: <p>I am using the WordPress plugin WP-PostViews to display the number of views a post has. I am using this code and it works great:</p>
  
  <pre><code>&lt;?php if(function_exists('the_views')) { the_views(); }?&gt;
  </code></pre>
  
  <p>The thing I want to do is to use this number of post views as a variable but I can't get it working. So far I have tried:</p>
  
  <pre><code>&lt;?php if(function_exists('the_views')) { $variable = the_views(); } ?&gt;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>&lt;?php if(function_exists('the_views')) { $variable = the_views(); } else { $var = 0; } ?&gt;
  </code></pre>
  
  <p>No success so far. Does anyone have suggestions?</p>