-
-
Save parzibyte/5d904b83651e65ae0eef0ffb7a97bcc5 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 | |
/* | |
Separar cadena usando delimitadores en PHP | |
https://parzibyte.me/blog | |
*/ | |
$cadena = "Maggie,Panqué,Guayaba"; | |
$separador = ","; | |
$separada = explode($separador, $cadena); | |
var_dump($separada); | |
/* | |
Salida: | |
array(3) { | |
[0]=> | |
string(6) "Maggie" | |
[1]=> | |
string(7) "Panqué" | |
[2]=> | |
string(7) "Guayaba" | |
} | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment