Skip to content

Instantly share code, notes, and snippets.

@ann71727
ann71727 / php multi-level category recursion
Last active January 5, 2019 21:50
PHP 無限層分類,包裹 HTML ul li 的架構 multi-level category recursion
/**
* get_childs function
* 無限層分類,包裹 HTML ul li 的架構
*
* @param array $items
* @param int $parent_id
* @return string
*
* @author VECTOR Ann <[email protected]>
* @link https://vector.cool
@ann71727
ann71727 / example-data.php
Last active January 7, 2019 14:07
php ( 遞迴 ) 產生樹狀結構,不必重複連接資料庫
<?php
/**
* 樹狀結構 class
*
* @author VECTOR Ann <[email protected]>
* @link https://vector.cool
* @version 1.0.0
*/
$v_tree_demo = [
@ann71727
ann71727 / get-unique-filename.php
Last active January 7, 2019 14:09
PHP 取唯一檔名 get unique filename
<?php
uniqid()
54e6d1765a02a
uniqid('img_')
img_54e6d1765a0ec
uniqid('', true)
54e6d1765a1044.98757507
@ann71727
ann71727 / phpexcel applyfromarray.php
Last active August 3, 2019 09:36 — forked from codeachange/phpexcel applyfromarray.php
phpexcel 批量修改样式 applyFromArray 数组规则
<?php
/*** PHPExcel Object ***/
/* Get the default Style object */
(PHPExcel_Style) $style = ((PHPExcel) $excel)->getDefaultStyle()
/*** PHPExcel_Cell Object ***/
/* Get the Style object for a Cell */
@ann71727
ann71727 / PHPExcel_Basics.md
Created August 3, 2019 09:11 — forked from yajra/PHPExcel_Basics.md
PHPExcel Notes and code snippets

Basics

Creating a new PHPExcel Object.

    $this->PHPExcel = new PHPExcel();

Working with sheets

Creating a new sheet:

@ann71727
ann71727 / Prototype.class.js
Created October 14, 2019 16:16 — forked from jmcorpdev/Prototype.class.js
Js prototype with jquery plugin integration
/**
*
*/
(function ($) {
PluginName = function () {
this.init.apply(this, arguments);
};