PHP:数组与数据结构
数组与数据结构:1.array_pop();删除数组中最后一个值.**?php $arrarray( title1linux, title2java, title3php, title4js, title5shell, title6python, title7ruby, title8c, ); array_pop($arr); echo pre; print_r($arr); echo /pre; ?结果是Array ( [title1] linux [title2] java [title3] php [title4] js [title5] shell [title6] python [title7] ruby )2.array_push();从数组的最后插入一个值.**?php $arrarray( title1linux, title2java, title3php, title4js, title5shell, title6python, title7ruby, title8c, ); array_push($arr,rrr); echo pre; print_r($arr); echo /pre; ?结果是Array ( [title1] linux [title2] java [title3] php [title4] js [title5] shell [title6] python [title7] ruby [title8] c [0] rrr )3.array_shift();删除数组中第一个值.**?php $arrarray( title1linux, title2java, title3php, title4js, title5shell, title6python, title7ruby, title8c, ); array_shift($arr); echo pre; print_r($arr); echo /pre; ?结果是Array ( [title2] java [title3] php [title4] js [title5] shell [title6] python [title7] ruby [title8] c )4.array_unshift();从数组的第一个位置插入一个值.**?php $arrarray( title1linux, title2java, title3php, title4js, title5shell, title6python, title7ruby, title8c, ); array_unshift($arr,rrr); echo pre; print_r($arr); echo /pre; ?结果是Array ( [0] rrr [title1] linux [title2] java [title3] php [title4] js [title5] shell [title6] python [title7] ruby [title8] c )