Created
February 10, 2018 01:34
-
-
Save javimata/3eb84d29c83801169601ae28cc6a3f02 to your computer and use it in GitHub Desktop.
obtener params
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 | |
$contenido = 'Aqui iria el contenido {jForm type="text" value="nombre"} de prueba {jForm test="probandox"} test.'; | |
$regex = '/{jForm\s(.*?)}/i'; | |
preg_match_all($regex, $contenido, $matches, PREG_SET_ORDER); | |
if ($matches) | |
{ | |
foreach ($matches as $match) | |
{ | |
$matcheslist = explode(',', $match[1]); | |
// $pattern = '/\{jForm\}(.*?)\{\/jForm\}/s'; | |
$position = trim($matcheslist[0]); | |
echo $position; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment