Jump to content

freakus_maximus

Members
  • Posts

    177
  • Joined

  • Last visited

    Never

Everything posted by freakus_maximus

  1. Hehe...oops! It was easier than I thought. I just added the two right before the xls_send since the data was being sent as one string. Thanks for the quick reply! [code]foreach( $data as $row ) $xls_rows .= xls_format_row( $row ); $xls_rows = str_replace(array("</p><p>", "</li><li>"), ", ", $xls_rows); $xls_rows = strip_tags($xls_rows); xls_send( $headers, $xls_rows );[/code]
  2. Before anyone says I shouldn't allow tags in the initial form, I know. In this situation the application is internal (not on the 'net) and the user base limited. I am using a java app ("TinyMCE") to allow users to enter text and apply some limited formatting. The app stores the tags in the db along with the text. Such as: <strong>Here is some text</strong> I need to maintain this so I can present it back to the user in the same format. So, please no bashing about that. The problem I am having is actually with the following code. This grabs the data from the db and dumps it out to an Excel spreadsheet. This works, no problem there. But, I need to str_tags the "description" column in this example to remove the tags. Can't seem to figure out how to do that with the array. Any help? (I mentioned the str_replace as well in my Topic Title and hoping the solution to the first problem gives me direction on the this as well.) [code]$headers = ("FancyNameColumn1"."\t"."FancyNameColumn2"."\t"."FancyNameColumn3."\t"); $result = mysql_query('select defectnum, description, username from release_notes_tbl'); $count = mysql_num_fields($result); $data = array(); while($row = mysql_fetch_row($result)) { array_push($data, $row); } $xls_rows = ''; foreach( $data as $row ) $xls_rows .= xls_format_row( $row ); xls_send( $headers, $xls_rows );[/code] Thanks for any help!
×
×
  • 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.