<?php
$key = 'First_Name';
$keyarr = explode('_',$key);
$string  = $keyarr[0].' '.$keyarr[1];



//I've got a swear filter. Replace all swears with the appropriate number of ****

$sentence = "Fudge, that darn mothertrucker";
$swears = array("fudge", "darn", "mothertrucker");

    foreach ($swears as $swear){
        $len = strlen($swear);
        $replacestring = '';
        for($i=1;$i<=$len;$i++){
            $replacestring .= 'x';
        }
     $sentence = str_ireplace($swear, $replacestring, $sentence);   
        //get length of swear
        //generate string of xxs 
        //replace word in sentence
    }
        echo $sentence.'<br>';

