I have an input for search ,
i search for "res"
<input type="text" name="search"I/>
i use Like method to get search results,
$txt = $this -> input -> post("search");
$this -> db -> like('title', $txt);
if ($sql = $this -> db -> get('ads') -> result()) {
$data['posts'] = $sql;
print_r($sql);
}
and get this results :
some text restaurant and other
some text result
my resume
i want to show the liked word extract the word from strings and remove other texts
i want this :
restaurant
result
resume