I want to get text inside the tags as well as its value.
Example
In order to get both the label and the value using just PHP, you need to have both arguments as part of the value.
For example:
Text
PHP Code
Output:
Array( [0] => 'Text', [1] => 5 )
This is one way to do it.