- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
/**
*
* Remove single symbols
* string $text
*/
public function removeSingleSymbols($text)
{
mb_internal_encoding("UTF-8");
$searchQuery = str_replace('"', '', $text);
$arr = explode(" ", $searchQuery);
$flag = false;
foreach ($arr as $word){
if(mb_strlen($word) > 1){
if(flag){
$searchText .= " ";
}
$flag = true;
$searchText .= $word;
}
}
$searchText = trim($searchText);
if($flag){
$searchText = '"' . $searchText . '"';
}else{
$searchText = '';
}
return $searchText;
}
blackray 04.03.2011 16:24 # 0
wvxvw 04.03.2011 17:40 # 0
blackray 04.03.2011 17:52 # 0