Jump to content

Naif

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Naif's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi, I am trying to create a statement using preg_replace which searches for a word based on word boundary and the search is going to be case insensitive. The problem I am experiencing is that I need to ensure it doesn't search for this word inside an <img /> tag. So basically I need to restrict the search from being performed inside <img />. The code I am using at the moment is as follows: $content = preg_replace("/\b$key\b/i", "<u>\\0</u>", $content); I'll appreciate the help that I can get here. Thanks. Regards, -- Naif
  2. Hi guys. I am new here and this is my very first post. From the past 2 days I have been trying to search for a PHP script or a class which I can use to convert either .doc or .rtf files into HTML format. I am creating a website which is going to feature tutorials. I want to save the tutorials as either rtf or doc documents and I want to use the php script to read, process and output the contents in HTML format. The only script I came across was one I found on www.phpclasses.org but the script seems to be buggy. Can anyone help me here? I will be looking forward for the replies. Thanks PS: I am aware of the fact that the .doc format is binary and that its possible to convert a doc file to HTML using the COM package but I am using a webhost which runs on Linux. So I am not looking for anything which depends on the COM package.
×
×
  • 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.