Loading...

PHP清空陣列函數

Temperature: 0 °C

Mark ChangMark Chang
author_tools


PHP清空陣列函數

unset(arrar)
將整個陣列清空,但之後如果再加入元素,其 index 是往上累加的,而非從 0 開始。

array_values($arr)
使用 unset() 去掉陣列的元素後 index 可能會很混亂,此時可用此函數
 
 

https://innstory.com/story-PHP清空陣列函數-1560
PHP

Prev
 分享_微軟宣布重大改組!21年老將下台、解散Windows團隊轉攻2業務一段大時代成歷史…風傳媒

Next
PDO常用方法 

About the Author

Mark Chang

離不開電腦的宅男

Visitor message

Leave some footprints to prove that you visited me

Recommended reading

Author's other related stories

javascript獲取當前時間

javascript獲取當前...

watchclock var myDate = new Date(); //獲取當前年 var ye...

分享 斜槓青年正夯,什麼都會才是王道?他舉賈伯斯、巴菲特為例,勸你萬萬不可跨領域-風傳媒

分享 斜槓青年正夯,什麼都會...

巴菲特:「了解自己的能力圈,待在裡面。這個圈圈到底有多大其實無關緊要。知道圈圈的邊線究竟在哪則非常重...

CSS3濾鏡Filter的十種特效

CSS3濾鏡Filter的十...

CSS 濾鏡效果 Filters 主要是運用在圖片上,以實現一些特效。 grayscale 灰階 s...

Please select an option

error

Hi, thank you for your participation, but you cannot vote repeatedly~

Join innstory now and start recording your story.

"Innstory" is a place to store stories. We are committed to becoming a warm platform. Deepening the bonds between people is our direction.
We are convinced that the blockchain between people is not just a cold calculation. Join us now.

Wrong format