Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- Eclipse
- 제이쿼리
- 자바
- 6월 공모주 청약 일정
- 공모주 청약 일정
- 공모주
- 자바스크립트
- SQL
- 오라클
- linux
- JavaScript
- 주식
- css
- Stock
- jquery
- 리눅스
- 주식 청약
- java
- 7월 공모주 청약 일정
- php
- 공모주 청약
- IPO
- 맥
- html
- 주식 청약 일정
- MYSQL
- 코드이그나이터
- codeigniter
- Stock ipo
- Oracle
Archives
- Today
- Total
목록array shuffle (2)
개발자의 끄적끄적
[php] php array shuffle 함수
[php] php array shuffle 함수 function custom_shuffle($my_array = array()) { $copy = array(); while (count($my_array)) { // takes a rand array elements by its key $element = array_rand($my_array); // assign the array and its value to an another array $copy[$element] = $my_array[$element]; //delete the element from source array unset($my_array[$element]); } return $copy; } $new_aarray = custom_shuff..
개발/php
2019. 10. 3. 01:00
[javascript] array shuffle 배열 섞기
[javascript] array shuffle 배열 섞기 function shuffle(a) { var j, x, i; for (i = a.length; i; i -= 1) { j = Math.floor(Math.random() * i); x = a[i - 1]; a[i - 1] = a[j]; a[j] = x; } } a 라는 배열을 넣으면 랜덤으로 내용이 섞입니다! 유용한 함수이니 많이 도움되시길!
개발/javascript & jquery
2019. 9. 24. 09:45