Get file extension from a string


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. $path_parts = pathinfo('/www/htdocs/index.html');
  2. $extension = $path_parts['extension'];

Report this snippet


Comments


You need to login to view comments.