undefined offset && bad argument
| From: | victor at argilent dot com | Date: | Thu, 15 Aug 2002 19:14:36 +0000 |
| Subject: | undefined offset && bad argument | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-112835@lists.php.net to get a copy of this message | ||
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
For this code:
<?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');
// Original first tag
//<div class=Section1>
// Original last tag
//</div>
preg_match('!<div class=Section1[^>]+>(.*)</div>!Uis',$str,$regs);
$everything_between_divs=$regs[1];
$good = implode(' ', $everything_between_divs)
or die ('Error 5');
$clean = ereg_replace("<o:p></o:p>", " ", $regs[1]);
echo $clean;
?>
there might be something wrong with the reg exptession. Or the
variables?
Please help, thanks
- Vic
______________________________________________________________________
Post your ad for free now! http://personals.yahoo.ca