関数array_uniqueを使用しても、配列からdouble値を「削除」できません!
<?php
$tags_array = array() ;
$query_tags = $mysql->Query("SELECT words AS kw FROM users ") ;
/****
*
* This query return something like Array([1] => PHP,ASP,NET [2] => Ruby,Jquery,php,asp_net [3] => Php,asp,visualbasic,c# [4] => [5] =>)
*
*****/
while($fetch_tags = $mysql->Fetch($query_tags))
{
foreach(explode(',',$fetch_tags['kw']) as $kw => $value)
{
if(empty($value)) ;
else
{
$value = ucwords(strtolower($value)) ;
$tags_array[] = $value ;
}
}
}
$tags_array = array_values(array_unique($tags_array, SORT_STRING)) ;
print_r($tags_array) ;
/******
*
* print_r show somethings like this Array([1] => Asp [2] => Php [3] => Php [4] => Ruby [5] => Jquery [6] => Php [7] => Asp_net [8] = >C# [9] => Asp)
*
* IT'S ONLY AN EXAMPLE TO SHOW YOU THE SITUATION
*****/
?>