August 4, 2011

Add prefix to a file, add prefix to an image

Add prefix to a file, add prefix to an image:

function prefixToImg($prefix,$img_src)
{
$img = explode(‘/’,$img_src);

$img[(count($img)-1)] = $prefix.$img[(count($img)-1)];

return implode(‘/’,$img);
}

Last updated: March 19, 2014
Did it helped? One thought on “Add prefix to a file, add prefix to an image
  1. Humna Zaidi on Facebook

    acha he

Comments are closed.