Can’t split the_title() by white space

The first way you tried should work if you use get_the_title() instead. It’s because get_the_title returns the title, whereas the_title() function echos the title by default.

$title_split = explode(" ", trim(get_the_title()));

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)