i some more help on the whole ereg thingy please

From: Date: Fri, 16 Aug 2002 02:02:50 +0000
Subject: i some more help on the whole ereg thingy please
Groups: php.general 
Request: Send a blank email to php-general+get-112893@lists.php.net to get a copy of this message
Hi, I hope you can help me a bit more, this is is my current script: (look after for more messages) <?php $file_name = $page_name.$ext or die ('Error 2'); $file = file($path.$file_name) or die ('Error 3'); $str = implode(' ', $file) or die ('Error 4'); // This is to check if the above code works // echo $str; // End check // Original first tag from the document I need to parse // <div class=Section1> // Original last tag // </div> preg_match('!<div class=Section1[^>]+>(.*)</div>!Uis',$str,$regs[1]); $everything_between_divs = $regs[1]; //echo $everything_between_divs; $good = implode(' ', $regs) or die ('Error 5'); // This is for later use to edit the contents of stuff between // the div tags - if I get the div tags to ever work $clean = ereg_replace("<o:p></o:p>", " ", $good); echo $clean; ?> it doesn't work, what do you think I'm doing wrong? I get this error: Notice: Undefined offset: 1 in /home/victor/argilent-www/sites/malibu_place_2/index.php on line 104 Warning: Bad arguments to implode() in /home/victor/argilent-www/sites/malibu_place_2/index.php on line 106 Error 5 Thanks, - Vic ______________________________________________________________________ Post your ad for free now! http://personals.yahoo.ca

« previous php.general (#112893) next »