<?php
function convertImage(&$string)
{
$string = preg_replace('/\s+/', '', $string);
$string = str_replace("'", "", $string);
$string = substr($string, 0, strlen($string)-3);
$string = strtolower($string);
return $string.".jpg";
}
$mod = "Thief's Wit (4)"; //storing the value
convertImage($mod);
echo $mod; //outputting the value
?>