What response are you expecting, and what response are you getting?

assuming your regex is working as expected, you are running it twice to receive
the same result into 2 different variables???  why not just copy the variable
after

additionally, $printing is filled with the matches of your regex(10 of them
according to manual)  as such you have to specify which element of $printing you
are wanting to print, or you will get the lovely "array" output

I don't understand why the grab variables are there unless you need them later.
Without accounting for your regex...

        eregi("$GrabStart(.*)$GrabEnd", $rf, $printing);
        echo $printing[1];
        $printingb=$printing;
        echo $printingb[1];

>I have a web fetching script that fetches text from an external URL and I
>would like to grab two lots of text at the same time - can anyone tell me
>why this isn't working?
>
><?
>
>$GrabURL = "http://grabfile.html";;
>$GrabStart = "start";
>$GrabEnd = "stop";
>
>$file = fopen("$GrabURL", "r");
>
>$rf = fread($file, 20000);
>
>$grab = eregi("$GrabStart(.*)$GrabEnd", $rf, $printing);
>
>echo $printing;
>
>rewind($rf);
>
>$grab2 = eregi("$GrabStart(.*)$GrabEnd", $rf, $printingb);
>
>echo $printingb;
>
>fclose($file);
>
>?>
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to