php split array example

WBOY
Release: 2016-07-25 08:54:12
Original
1054 people have browsed it
  1. $arr=explode("|",$array['aa']);

  2. //Split the array

  3. $num =@count($arr);

  4. //Get the number of arrays

  5. for($i=0;$i<$num;$i++){//Loop the array
  6. echo $ arr[$i];
  7. }

Copy code

>>> Articles you may be interested in: PHP array splitting and array joining php chunk function split array instance php mb_chunk_split function supports wide character split Example of php space-separated text into array A simple example of splitting a Chinese string into an array in php Several ways to split Chinese and English strings in php php split() string splitting function application example Solution to php splitting GBK Chinese garbled characters Example of php string splitting function explode



Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!