本文整理汇总了PHP中remove_duplicate函数的典型用法代码示例。如果您正苦于以下问题:PHP remove_duplicate函数的具体用法?PHP remove_duplicate怎么用?PHP remove_duplicate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了remove_duplicate函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_tagClouds
function get_tagClouds()
{
$parsedString = new jSearchString();
$parsedString = $parsedString->parseString($_GET['words']);
$parsedString = trim($parsedString);
//echo $parsedString;
if ($parsedString != NULL) {
$tag_array = explode('Ç', $parsedString);
//$tag_array = trim($tag_array);
//update the database
foreach ($tag_array as $tag_word) {
$tag_word = trim($tag_word);
$query = "SELECT search_terms, MATCH (search_terms) AGAINST ({$tag_word}) AS count FROM tagclouds ";
if (mysql_query($query) != true) {
$sql = "UPDATE tagclouds SET value=value+1 where search_terms=" . "'{$tag_word}'";
//echo $sql;
$result = mysql_query($sql) or die(mysql_error());
}
if ($tag_word == NULL || strlen($tag_word) <= 2) {
next($tag_array);
} else {
//echo $tag_word;
$sql = "INSERT INTO `tagclouds`( \r\n\t\t\t\t\t\t\t\t\t\t\t\t `search_terms` \t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t ) \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t VALUES ( \t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t '" . $tag_word . "')";
mysql_query($sql) or die("Bad query on detail: " . mysql_error());
remove_duplicate();
}
}
}
}
示例2: remove_duplicate
break;
case "uid":
$f = $f + 1;
break;
}
$f++;
}
$l++;
$i++;
}
/* remove duplicate items by mac address */
if (count($leases) > 0) {
$leases = remove_duplicate($leases, "ip");
}
if (count($pools) > 0) {
$pools = remove_duplicate($pools, "name");
asort($pools);
}
// Put this in an easy to use form
$dhcpmac = array();
$dhcpip = array();
foreach ($leases as $value) {
$dhcpmac[$value['mac']] = $value['hostname'];
$dhcpip[$value['ip']] = $value['hostname'];
}
exec("/usr/sbin/arp -an", $rawdata);
$i = 0;
/* if list */
$ifdescrs = get_configured_interface_with_descr();
foreach ($ifdescrs as $key => $interface) {
$thisif = convert_friendly_interface_to_real_interface_name($key);
示例3: remove_duplicate
$leases[$l]['hostname'] = $hostname;
}
}
$f = $f + 1;
break;
case "uid":
$f = $f + 1;
break;
}
$f++;
}
$l++;
$i++;
}
if (count($leases) > 0) {
$leases = remove_duplicate($leases, "ip");
}
foreach ($config['interfaces'] as $ifname => $ifarr) {
if (is_array($config['dhcpd'][$ifname]) && is_array($config['dhcpd'][$ifname]['staticmap'])) {
foreach ($config['dhcpd'][$ifname]['staticmap'] as $static) {
$slease = array();
$slease['ip'] = $static['ipaddr'];
$slease['type'] = "Sabit";
$slease['mac'] = $static['mac'];
$slease['start'] = "";
$slease['end'] = "";
$slease['hostname'] = htmlentities($static['hostname']);
$slease['act'] = "Sabit";
$online = exec("/usr/sbin/arp -an |/usr/bin/grep {$slease['mac']}| /usr/bin/wc -l|/usr/bin/awk '{print \$1;}'");
if ($online == 1) {
$slease['online'] = 'Çevrimiçi';
示例4: searchOne
<?php
require "../../php_functions/connect1.php";
require "../../php_functions/function.php";
require "../../php_functions/myclass.php";
require "../../php_functions/library.php";
require "../../php_functions/source.php";
$search_res = searchOne('fs_pltag', 9, $_GET["purchased_at_type_in"], 'plt_purchased_at', '10');
$store = convert_1d($search_res, 8);
$store = remove_duplicate($store);
// $store=array('gaisano','mall','unitop','unicity','unitop','unicity','unitop','unicity','unitop',"unicitsdsdy $_GET[purchased_at_type_in]");
if (!empty($store)) {
echo "\n \t\t<div id='ajax_div_container'>\n\t\t\t<span id='x' onclick='close_x()' title='(close)' >x</span>\n\t\t\t<table border=0 cellpadding=0 cellSpacing=2> \n\t\t";
$c = 0;
for ($i = 0; $i < count($store); $i++) {
$c++;
$b = $store[$i];
if ($c % 9 == 0) {
echo '<tr>';
} else {
echo "<td> <span onclick='get_clicked_PURCHASED(\"{$b}\")' > {$b} </span></td> ";
}
}
echo "\n \t\t\t</table>\n \t\t</div>";
}
?>
示例5: calc_topmember
public function calc_topmember($luploaded, $date)
{
$dates = $this->date_difference();
$c = 0;
$tmaxrate = $this->getTmaxrating($luploaded, $date);
# get overall max rate
// echo "<br>max total rate is <br>".$tmaxrate."<br>";
if (!empty($luploaded)) {
for ($i = 0; $i < count($luploaded); $i++) {
$user_lup[$i] = $luploaded[$i][1];
}
$mnos = remove_duplicate($user_lup);
for ($i = 0; $i < count($mnos); $i++) {
if ($date == 'all') {
$userLookUploaded = select('postedlooks', 7, array('mno', $mnos[$i]));
} else {
$userLookUploaded = select2_wop('postedlooks', 7, array('mno', intval($mnos[$i]), 'date_', $dates[$date]), array('=', 'and', '>'));
}
if (!empty($userLookUploaded)) {
// $rate=$this->highest_rate($userLookUploaded);
$c++;
$trate[$c] = $rate;
$tminfo[$i][0] = $mnos[$i];
$ovrates = $this->coarates_top($userLookUploaded, $tmaxrate);
for ($j = 0; $j < count($ovrates); $j++) {
$tminfo[$i][$j + 1] = $ovrates[$j];
# mno , rpercent , tpoints , trating.
}
} else {
# no uploaded look.
}
}
$tmfinfo = $this->descending_order2($tminfo);
// echo "after descending <br>";
// print_r($tmfinfo);
return $tmfinfo;
}
}
示例6: dirname
'pwd_meter',
'scriptaculous',
'syntaxhighlighter',
'tinymce',
),
);
$docroot = dirname(dirname(dirname(dirname(dirname(__FILE__)))));
define('CS_PATH_JAVASCRIPT', $docroot . DIRECTORY_SEPARATOR . 'javascript');
define('CS_PATH_JS', $docroot . DIRECTORY_SEPARATOR . 'js');
if ($handle = opendir(CS_PATH_JS)) {
while (($item = readdir($handle)) !== FALSE) {
if ($item != '.' && $item != '..') {
$item = CS_PATH_JAVASCRIPT . DIRECTORY_SEPARATOR . $item;
remove_duplicate($item);
}
}
closedir($handle);
}
function remove_duplicate($item)
{
if (is_file($item)) {
@unlink($item);
} elseif (is_dir($item)) {
@camp_remove_dir($item);
}
}
function camp_remove_dir($p_dirName)
示例7: get_all_mno_has_thesamebrand
function get_all_mno_has_thesamebrand($mybrand_indb)
{
$c = 0;
for ($i = 0; $i < count($mybrand_indb); $i++) {
// echo "string";
$usrs = select('fs_member_brand_selected', 4, array('bn', $mybrand_indb[$i][2]));
// select_w_2($tableName,$tablen,$where,$oparators){
// $tuser+=count($usrs);
// $mnos=arrange_usr($usrs,$tuser,$i);
// print_r($usrs);
for ($j = 0; $j < count($usrs); $j++) {
// print_r($usrs);
// echo "<br>";
if (!is_equal($usrs[$j][1], $_SESSION['mno'])) {
$mnos[$c] = $usrs[$j][1];
$c++;
}
}
// print_r($mnos);
}
// echo "<hr> before remove!<br>";
// print_r($mnos);
// $mnos_r=remove_duplicate($mnos);
// echo "<hr> after remove!<br>";
// print_r($mnos_r);
// echo "string";
// echo "<br>";
// echo $usrs[0][0][0];
return remove_duplicate($mnos);
}