- str_replace: documentation ( source)
<?php
$threep = 'assets/images/catalog/kitchen/fuksi/small_DSCN0818.JPG';
if ($threep != '') {
$threepcount = str_replace($onep, $twop, $threep, $count);
if ($count >= 1) {
$threepout = str_replace($twop, $onep, $threep, $count);
} else {
$threepout = str_replace($twop, $onep, $threep, $count);
}
} else {
echo '';
}
echo $threepout;