title: Combine three variables in PHP
body: <p>I'm trying to change the filename of a jpg that gets uploaded, then rename it based on the following, but it doesn't work.  </p>
  
  <pre><code>$myfile = ( $_FILES['image']['name']);
  $myfile = str_replace("'", '', $myfile);
  $myfile = str_replace('&amp;', '', $myfile);
  $myfile = str_replace('%', '', $myfile);
  $myfile = str_replace('!', '', $myfile);
  $myfile = str_replace('#', '', $myfile);
  $myfile = str_replace(' ', '', $myfile);
  
  $random = mt_rand(22, 32);
  $cj = "cj-";
  $myfile = $cj . $random . $myfile;
  </code></pre>
  
  <p>If I comment out the very last line it works so the combining of the 3 variables appears to be the problem.  Any ideas?</p>