January 11th, 2000, 10:26 PM
I'm having a hard time with this,
I have a webpage in a variable and i'm trying to get just the part of the page i need.
I'm very new with php but I know i need to split the variable into three parts
trashtext1= first part of page right before <body.....>
goodtext= text from rigth after body> to right before </body
trashtxt2= all remaineing text
then print goodtext
I'm not sure how to do this. I've been trying all day...
January 12th, 2000, 03:41 PM
January 13th, 2000, 04:52 PM
Try this as a test....
$var="<html><head></head><body>This is the main document text</body></html>";
$sections=split("<[/]?body>", $var, 3);
print"The first index is $sections<br>";
print"The second index is $sections<br>";
print"The third index is $sections<br>";
[This message has been edited by Kyuzo (edited January 13, 2000).]
January 13th, 2000, 11:48 PM
It works great!