I'm trying to transform a string to TitleCase before inserting it into my database. I'm using ucwords
.
My strings are like: FIRST_SECOND_THIRD
My code:
if (//something){
$resp = strtolower($line[14]);
$resp_ = ucwords($resp, "_");
//rest of the query...
}
var_dump($resp_)
returns null
and I have no idea why.