Jump to content

wordwrap not wrapping


graham23s

Recommended Posts

Hi Guys,

 

I'm using the simple php dom class to parse an html page, i'm using the ->plaintext; to just retrieve the words rather than the html, then i'm trying to wordwrap:

 

<?php
   $prodID = $_GET['productID'];
   $q      = mysql_query("SELECT * FROM `dig_products` WHERE `id`='$prodID'");
   $a      = mysql_fetch_array($q);
   $s      = $a['product_original_url']; 
   $html   = file_get_html($s)->plaintext;
   
   echo "<center><textarea rows='50' cols='50'>" . wordwrap($html, 10, "\n", true) . "</textarea></center>"; 
   //echo "<pre>$html</pre>";
?>

 

the problem is it's not wordwrapping the text no matter what number i set it to, i'm stumped

 

thanks for nay help guys

 

Graham

Link to comment
https://forums.phpfreaks.com/topic/205246-wordwrap-not-wrapping/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.