- var_dump: documentation ( source)
- str_replace: documentation ( source)
<?php
function grammahBendah($str='', $gender=''){
if ($gender == 'female'){
$str = str_replace(" him"," her", $str); //also handles 'herself'
$str = str_replace(" he"," she", $str);
$str = str_replace(" his"," her", $str);
$nPower00 = $str;
return $nPower00;
}
}
var_dump(grammahBendah('themselves', 'female'));