August 10, 2011

How to add a postfix to a filename or image name?

function postfixToImg($postfix,$img_src)
{

$img = explode(‘.’,$img_src);

$img[(count($img)-2)] = $img[(count($img)-2)].$postfix;

$return = implode(‘.’,$img);
return $return;
}

Last updated: March 19, 2014