"PHP sort()"의 두 판 사이의 차이

4번째 줄: 4번째 줄:
* 알고리즘: [[퀵소트]]
* 알고리즘: [[퀵소트]]


<syntaxhighlight lang='PHP'>
<syntaxhighlight lang='PHP' 겨ㅜ>
<?php
$arr = [11, 1, 12, 2];
$arr = [11, 1, 12, 2];
sort($arr);
sort($arr);

2022년 1월 24일 (월) 14:42 판

1 개요

PHP sort()
  • 배열을 정렬하는 PHP 함수
  • 알고리즘: 퀵소트
$arr = [11, 1, 12, 2];
sort($arr);
foreach($arr as $i) echo "$i ";
# 1 2 11 12

2 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}