$name = substr($name, 0, -strlen($ext)) . "_medium." . end(explode('.',$name));
the above code report strick standard warning, the small script as below:
function medium($name) {
$ext = strrchr($name, '.');
if($ext !== false) {
$name = substr($name, 0, -strlen($ext)) . "_medium." . end(explode('.',$name));
}
return $name;
}
function thumb($name) {
$ext = strrchr($name, '.');
if($ext !== false) {
$name = substr($name, 0, -strlen($ext)) . "_thumb." . end(explode('.',$name));
}
return $name;
}
function name_remove($name) {
$name = str_replace("_medium", "", $name);
$name = str_replace("_thumb", "", $name);
return $name;
}
how can i fix this warning? need help :)