Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this questionthe file now is like this:
<p>User friendly buttons and IR Remote Contr开发者_运维技巧ol for easy control </p>
<p>Quality stereo headset enables user to enjoy hi-fi dynamic sound </p>
<p>Replaceable, rechargeable Li-polymer battery </p>
<p>Specs Video transmission frequency: 2414, 2432, 2450, 2468 </p>
<p>Transmission distance: Approx 100m in open space </p>
<p>Bitmap Audio carrier wave: 6.0Mhz, 6.5mHz, + 50Khz </p>
<p> </p>
<p>S/N Ratio: 50-70 db </p>
<p>Diplay: True Color Micro LCD </p>
<p>Resolution: Full color 922k pixels, 640*480 </p>
<p>Viewing Angle: Diagonal 32 degree </p>
<p>Virtual Image Size: 80inches at 2M away </p>
<p>Contrast: 64:1, Color Depth: 24 bit </p>
I would like to get the same file but just the text (be carrefull there are things like < that i want them to be "<"
<?php
$str = html_entity_decode(strip_tags($str));
?>
$html = '<p>Your < html > here</p>';
$text = strip_tags($html);
$text = html_entity_decode($text);
echo $text;
Output: Your < html > here
Strip tags doc: http://us.php.net/manual/en/function.strip-tags.php
Html Entity Decode doc: http://php.net/manual/en/function.html-entity-decode.php
The PHP function strip_tags will remove all the <p>
for you and html_entity_decode will fix up your <
and co.
精彩评论