Skip to content

Instantly share code, notes, and snippets.

View haxianhe's full-sized avatar
🦍
Hello !

haxianhe haxianhe

🦍
Hello !
View GitHub Profile
@haxianhe
haxianhe / unique_array_more.php
Last active July 12, 2019 06:19
php 二维数组去掉重复值
<? php
/**
* 对二维数组去重
* @param $array2D
* @return array
*/
function unique_array_more($array2D)
{
foreach ($array2D[0] as $key => $value) {
@haxianhe
haxianhe / get_array_need.php
Last active July 12, 2019 06:19
php 过滤数组中有需要的键值对
<?php
public function filterArray($oldArray,$keyArray)
{
$newArray=array_intersect_key($oldArray, array_flip($keyArray));
return $newArray;
}
$promotion = array_intersect_key($promotion, array('id', 'promotion_id', 'promotion_actived', 'promotion_title',
'promotion_detail', 'promotion_type', 'promotion_type_name', 'sku_info', 'start_time', 'cancel_time','effect_scene'));
@haxianhe
haxianhe / aes_ecb_pkcs5.php
Created July 24, 2018 11:58 — forked from CodFrm/aes_ecb_pkcs5.php
PHP对接java的AES/ECB/PKCS5Padding加密方式
<?php
/**
*============================
* author:Farmer
* time:2017/12/19
* blog:blog.icodef.com
* function:加密方式
*============================
*/