- preg_match: documentation ( source)
- strtoupper: documentation ( source)
- ucfirst: documentation ( source)
<?php
$term = "100-200";
if ($term=="mpv" || $term=="bmw" || $term=="mg") {
echo strtoupper($term);
}
elseif(1 === preg_match('~[0-9]~', $term)){
echo "£$term";
}
else {
echo ucfirst($term);
}
?>
<!-- if(1 === preg_match('~[0-9]~', $string)){
echo "£$string";
}
?>