select id from admins where mozo like'ye chizi'oxygenws گفت:بگو که این مقادیر چطوری اومدند تو آرایه، شاید بشه یک راه سیستماتیک بهت معرفی کرد!
array_unique(); // takes input array and returns a new array without duplicate values.
sort(); //This function sorts an array.
در مورد تابع دوم مطمئنم کمکم میکنه ولی در مورد تابع اول باید روی کامپیوتر شخصیم امتحان کنم...ببخشین اگه سوالای آماتوری میکنم چون php و mysql تو یه طرح ضربتی در عرض چند روز گذشته خوندم.Ali_Farhadi گفت:php خیلی کاملتر از این حرفهاست.
کد:array_unique(); // takes input array and returns a new array without duplicate values. sort(); //This function sorts an array.
$result2 = $db->sql_query("SELECT DISTINCT keyword FROM ".$prefix."_blog where keyword!='' and active=1 order by keyword asc");
while (list($keyword) = $db->sql_fetchrow($result2)) {
$names = explode('،',$keyword);
$names_unique = array_unique($names);
$ttgo = str_replace(" ", "-", $names_unique[0]);
$out1 .= "<li><a href='".$site_url."search/".$ttgo."/'>".$names_unique[0]."</a></li>\n";
}