Skip to content

Instantly share code, notes, and snippets.

@haxianhe
Last active July 12, 2019 06:19
Show Gist options
  • Select an option

  • Save haxianhe/e69be41f9399e21b9b12ae8bbe7e2417 to your computer and use it in GitHub Desktop.

Select an option

Save haxianhe/e69be41f9399e21b9b12ae8bbe7e2417 to your computer and use it in GitHub Desktop.

Revisions

  1. haxianhe revised this gist Jul 12, 2019. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions get_array_need.php
    Original file line number Diff line number Diff line change
    @@ -6,5 +6,5 @@ public function filterArray($oldArray,$keyArray)
    return $newArray;
    }

    $promotion = array_intersect_key($promotion, array_flip(array('id', 'promotion_id', 'promotion_actived', 'promotion_title',
    'promotion_detail', 'promotion_type', 'promotion_type_name', 'sku_info', 'start_time', 'cancel_time','effect_scene')));
    $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'));
  2. haxianhe revised this gist Jul 12, 2019. No changes.
  3. haxianhe revised this gist Nov 19, 2018. No changes.
  4. haxianhe revised this gist Nov 19, 2018. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion get_array_need.php
    Original file line number Diff line number Diff line change
    @@ -4,4 +4,7 @@ public function filterArray($oldArray,$keyArray)
    {
    $newArray=array_intersect_key($oldArray, array_flip($keyArray));
    return $newArray;
    }
    }

    $promotion = array_intersect_key($promotion, array_flip(array('id', 'promotion_id', 'promotion_actived', 'promotion_title',
    'promotion_detail', 'promotion_type', 'promotion_type_name', 'sku_info', 'start_time', 'cancel_time','effect_scene')));
  5. haxianhe revised this gist Nov 13, 2018. 1 changed file with 7 additions and 2 deletions.
    9 changes: 7 additions & 2 deletions get_array_need.php
    Original file line number Diff line number Diff line change
    @@ -1,2 +1,7 @@
    $promotion = array_intersect_key($promotion, array_flip(array('id', 'promotion_id', 'promotion_actived', 'promotion_title',
    'promotion_detail', 'promotion_type', 'promotion_type_name', 'sku_info', 'start_time', 'cancel_time')));
    <?php

    public function filterArray($oldArray,$keyArray)
    {
    $newArray=array_intersect_key($oldArray, array_flip($keyArray));
    return $newArray;
    }
  6. haxianhe created this gist Nov 13, 2018.
    2 changes: 2 additions & 0 deletions get_array_need.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    $promotion = array_intersect_key($promotion, array_flip(array('id', 'promotion_id', 'promotion_actived', 'promotion_title',
    'promotion_detail', 'promotion_type', 'promotion_type_name', 'sku_info', 'start_time', 'cancel_time')));