andr.in
August 18th, 2003, 02:33 PM
I am loading text from a .txt file!
$NewsTxT = fread($fp, 10240);
I want to cut out some text from the beginning and make the cut-version $Oldtext
$Oldtext = eregi_replace('&newsTxT=<div align="center">(.*)</div><br><br><p align="left">News:<br><br><b>-', '', $NewsTxT);
//This part works perfectly!
And then I would like to have a variable $WelcomeTxT to have the value of the text that was cut out from the previous variable!
$WelcomeTxT = eregi_replace($Oldtext, '', $NewsTxT);
So it cuts out the rest of the text from the original text!
But for some reason it's not working! $WelcomeTxT has the same value as $NewsTxT!
Any ideas? Or any other wasy of doing this?
$NewsTxT = fread($fp, 10240);
I want to cut out some text from the beginning and make the cut-version $Oldtext
$Oldtext = eregi_replace('&newsTxT=<div align="center">(.*)</div><br><br><p align="left">News:<br><br><b>-', '', $NewsTxT);
//This part works perfectly!
And then I would like to have a variable $WelcomeTxT to have the value of the text that was cut out from the previous variable!
$WelcomeTxT = eregi_replace($Oldtext, '', $NewsTxT);
So it cuts out the rest of the text from the original text!
But for some reason it's not working! $WelcomeTxT has the same value as $NewsTxT!
Any ideas? Or any other wasy of doing this?