- strpos: documentation ( source)
- var_export: documentation ( source)
- str_replace: documentation ( source)
- explode: documentation ( source)
<?php
$test = 'world cup';
$arr = explode("\n",$test);
$C= new stdClass();
$C->AUTO_HASHTAG = $arr;
$myarr = array("world cup");
foreach($myarr as &$ht){
if(strpos($ht,'o')!==false)
$myarr[] = str_replace('o','O',$ht);
if(strpos($ht,'O')!==false)
$myarr[] = str_replace('O','o',$ht);
}
var_export($myarr);