Catch text between a tag

Asked

Viewed 489 times

4

I have this string <td id="aui_3_2_0_1196">500</td>, would like to take the value 500 between the tag beginning and end (<td id="aui_3_2_0_1196"> and </td>).

1 answer

6


Try:

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

Something is going on.

  • Thanks! You helped the hell out!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.