title: PHP rename variable to unique value returns 1
body: <p>I have a file name which I need to give a unique name to in PHP. The file looks like this:</p>
  
  <blockquote>
    <p>orders_dd-mm-yy#hh:mm:ss.csv</p>
  </blockquote>
  
  <p>I want to change it to:</p>
  
  <blockquote>
    <p>orders_dd-mm-yy_uniquevalue.csv</p>
  </blockquote>
  
  <p>As I believe the hash and colons are causing issues when I try to import the CSV file into an SQL database.</p>
  
  <p>However when I use this code to change the variable, it becomes a '1':</p>
  
  <pre><code>$file = rename('/var/www/html/' . $file, '/var/www/html/' . explode('#', $file))[0] . '_' . uniqid() . '.csv';
  </code></pre>
  
  <p>What am I doing wrong?</p>