额,一个SQL操作成功貌似对我难度有点大,我的想法是:
code:
SELECT * FROM tag
result example:
$result = array('php','php,mysql','jquery','html','php','ruby','java,jquery,js','java','html','css');
code:
$result = implode(',',$result);
result example:
$result = 'php,php,mysql,jquery,html,php,ruby,java,jquery,js,java,html,css';
code:
$result = explode(',',$result);
result example:
$result = Array ( [0] => php [1] => php [2] => mysql [3] => jquery [4] => html [5] => php [6] => ruby [7] => java [8] => jquery [9] => js [10] => java [11] => html [12] => css );
code:
$result = array_unique($result);
result example:
$result = Array ( [0] => php [2] => mysql [3] => jquery [4] => html [6] => ruby [7] => java [9] => js [12] => css )