On Thu, Nov 20, 2003 at 09:45:45AM -0500, Scott Fletcher wrote:
: 
: I can give the strpos() a shot but I seem to have problem with getting the
: strpos() to give me two seperate "<!CDATA[[****]]>" tags instead of just hte
: first one only...

Use the offset parameter:

        <?php

        $haystack = 'To be or not to be.';
        $needle = 'be';
        $needlesize = strlen($needle);
        $pos = 0;
        while (($pos = strpos($haystack, $needle, $pos)) !== false)
        {
                echo '$pos = '.$pos."\n";
                $pos += $needlesize;
        }

        ?>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to