PHP 字符串转换成数组str_split
将连续的字符串转换成单个的字符数组
例子:
<?php $str = 'abcde'; $arr1 = str_split($str); print_r($arr1); ?>
输出结果如下:
Array ( [0] => a [1] => b [2] => c [3] => d [4] => e )
其与explode的区别是:explode第一个参数必须传一个切分字符(如:, | 空格 )才能进行分割;str_split则直接进行分割
更多相关教程请访问 php编程从入门到精通全套视频教程

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

WebStorm Mac version
Useful JavaScript development tools

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

Zend Studio 13.0.1
Powerful PHP integrated development environment

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function
