-
-
Save parzibyte/3062ed0978ac9f50f012d7af9a310914 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Cadena a arreglo en PHP: separar todas las letras | |
https://parzibyte.me/blog | |
*/ | |
$cadena = "http://parzibyte.me/blog"; | |
$arreglo = str_split($cadena); | |
var_dump($arreglo); | |
/* | |
Salida: | |
array(24) { | |
[0]=> | |
string(1) "h" | |
[1]=> | |
string(1) "t" | |
[2]=> | |
string(1) "t" | |
[3]=> | |
string(1) "p" | |
[4]=> | |
string(1) ":" | |
[5]=> | |
string(1) "/" | |
[6]=> | |
string(1) "/" | |
[7]=> | |
string(1) "p" | |
[8]=> | |
string(1) "a" | |
[9]=> | |
string(1) "r" | |
[10]=> | |
string(1) "z" | |
[11]=> | |
string(1) "i" | |
[12]=> | |
string(1) "b" | |
[13]=> | |
string(1) "y" | |
[14]=> | |
string(1) "t" | |
[15]=> | |
string(1) "e" | |
[16]=> | |
string(1) "." | |
[17]=> | |
string(1) "m" | |
[18]=> | |
string(1) "e" | |
[19]=> | |
string(1) "/" | |
[20]=> | |
string(1) "b" | |
[21]=> | |
string(1) "l" | |
[22]=> | |
string(1) "o" | |
[23]=> | |
string(1) "g" | |
} | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment