- strpos: documentation ( source)
- var_export: documentation ( source)
- str_replace: documentation ( source)
- explode: documentation ( source)
<?php
$test = 'جام جهانی
فیفا2014
فیفا
تیم ملی
برزیل
کامرون
مکزیک
کرواسی
اسپانیا
شیلی';
$arr = explode("\n",$test);
$C= new stdClass();
$C->AUTO_HASHTAG = $arr;
foreach($C->AUTO_HASHTAG as &$ht){
if(strpos($ht,'ا')!==false)
$C->AUTO_HASHTAG[] = str_replace('ا','آ',$ht);
}
var_export($C->AUTO_HASHTAG);