在未知道这个函数前我们要在数据前面插入一些元素觉得很复杂,要利用遍历来操作,要不就插入到后面了,下面我们分享一个实用的array_unshift()函数,它可以解决一切问题。
先不说什么先看实例
#1 array_unshift() example
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn