trim some words from srting i php code example Example: how to trim text php $text = " hello world "; $text = trim($text); => "hello world"