I have a string, similar to an XML document:
<lists>
<list name='NOVOS' values='1'>
<list name='OLDS' values='2'>
</lists>
What I need is to scan this code, and create an array with the name of the list.
Getting, for example, his return: 0 - > NEW and 1 - > OLDS, and so on.
I tried:
preg_match( '/name="([^"]*)"/i', $s, $lists_return );
Sometimes it works and sometimes only the first item in the list returns. The variable s
is where the string I mentioned above is. It can be in regular expression.