Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created July 12, 2019 22:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/8ad819dc033cbde6b3aecfce2faa3fca to your computer and use it in GitHub Desktop.
Save parzibyte/8ad819dc033cbde6b3aecfce2faa3fca to your computer and use it in GitHub Desktop.
<?php
/*
Separar cadena usando delimitadores en PHP
https://parzibyte.me/blog
*/
$cadena = "parzibyte.mehttps://www.gogle.comhttps://facebook.com";
$separador = "https://"; // Usar una cadena
$separada = explode($separador, $cadena);
var_dump($separada);
/*
Salida:
array(3) {
[0]=>
string(12) "parzibyte.me"
[1]=>
string(13) "www.gogle.com"
[2]=>
string(12) "facebook.com"
}
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment