How about

$that = file_get_contents( "file.html" );

HalfaBee

    {
    $that = "<div align="center"><a href="">M</a></div>"
    ereg_replace("\"","\\\"",$that);
    }
    
    where are you getting this:
    
    <div align="center"><a href="">M</a></div>
    
    from in the first place?

      i write my HTML into $that, so when i do that, see look:

      $that = "<a href=""></a><a href="blabla"></a>";
      ereg_replace("/"","\\\", $that);
      

      have u noticed that my 'blablabla' is not reading...

        i need a triple quote, i need to include texxt with quotations into a variable that is assigned BY QUOTATIONs what this does is, goes out of it's boundary and makes my

        ereg_replace color red
        it also makes my ; red also, and THUS i get a parse error

          $that = "<a href=""></a><a href="blabla"></a>";
          ereg_replace("/"","\\\", $that);
          

          where are you getting the text that you're piping into $that?

          Is this coming from a file?

          Have you typed it into your php script?

          where is it coming from?

            As much as doing things manually sucks...search and replace in a decent PHP IDE would get rid of this in seconds would it not? :eek:

            Zend: Ctrl + H
            Maguma Ctrl + R

            I'm just starting to use Zend but in Maguma you could open any file in question and do a search and replace on all of the currently open files...

              drawmack: i type in my html
              it is a big ass thing, first i do it in dreamweaver then i add it into $that = " "; and paste it into the little space

              as for borntodie, i dunno wth u r talkin about..

                using dreamweaver is your first problem.

                If I were you I would write a little per script called html2php.pl that did all this for me using regex. It would only be about ten lines of code and you could make it crawl from the strating directory down.

                I have one that does html2perl I'll see if I can dig it up.

                  dude i dont like perl and i dont know perl, and whats wrong with dreamweaver, u can see the colors which help...

                  now what else can i do to solve my problem?

                    Dreamweaver is a wysiwyg editor and it has the same problem as all other wysiwyg editors and that is things like you're running into right now.

                    If you hand coded your site you wouldn't have this problem.

                    The best solution is a script that will automatically process the text for you.

                    Question: How can you not like PERL when you don't even know it?

                      well i found myself a solution cuz no other ones work... so..

                      if ($page == "order") {
                      $filename = "order.txt";
                      $thefile = @fopen($filename, "r") or die("where the hell is the file?");
                      $contents = fread($thefile, filesize($filename));
                      ereg_replace("\"","\\\"", $contents);
                      echo $contents;
                      fclose($thefile);
                      }
                      

                      i put my html into a txt file, which pretty much eliminated the point of my proccess but, what the hey...

                        easy... cuz of ur icon

                          Dax - don't ever base your opinions on those of others.

                          I hate PERL for webdev but it's great at text processing.

                            hehe... 😉

                            good but i dunno what that means anyhoo

                              Write a Reply...