<?php
$test = 'world cup';
$arr = explode("\n",$test);
$C= new stdClass();
$C->AUTO_HASHTAG = $arr;
foreach($C->AUTO_HASHTAG as &$ht){
if(strpos($ht,'o')!==false)
$C->AUTO_HASHTAG[] = str_replace('o','O',$ht);
if(strpos($ht,'O')!==false)
$C->AUTO_HASHTAG[] = str_replace('O','o',$ht);
if(strpos($ht,' ')!==false){
$C->AUTO_HASHTAG[] = str_replace(' ','-',$ht);
$C->AUTO_HASHTAG[] = str_replace(' ','_',$ht);
}
}
var_export($C->AUTO_HASHTAG);
preferences:
35.97 ms | 402 KiB | 5 Q