Catch the text between a tag

3

I have this string <td id="aui_3_2_0_1196">500</td> , I'd like to get the value 500 between the start and end tag ( <td id="aui_3_2_0_1196"> and </td> ).

    
asked by anonymous 05.11.2016 / 04:31

1 answer

7

Try:

$text = '<td id="aui_3_2_0_1196">500</td>';
echo strip_tags($text);

Anything goes on commenting.

    
05.11.2016 / 05:03