title: rename file name using path info extension with dot
body: <p>i need new name of file name using pathinfo($url,  PATHINFO_EXTENSION);</p>
  
  <p>this my code</p>
  
  <pre><code>$name = "name.txt";
  $f = fopen($name, 'r');
  
  $nwname = fgets($f);
  
  fclose($f);
  
  $newfname = $destination_folder .$nwname. pathinfo($url, PATHINFO_EXTENSION);
  </code></pre>
  
  <p>output:
  1 jpeg</p>
  
  <p>how to make output nospace and write (.) dot before jpeg like this</p>
  
  <p>output:
  1.jpeg</p>
  
  <p>thank</p>