php-general Digest 2 Sep 2012 04:24:09 -0000 Issue 7946

Topics (messages 318935 through 318937):

Easiest way to create a web service based on a WSDL document
        318935 by: Néstor Boscán
        318936 by: Lars Nielsen

Re: extract Occurrences AFTER ... and before "-30-"
        318937 by: John Taylor-Johnston

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
Hi

What's the easiest library/technology/solution to create a web service in
PHP based on a WSDL document?

Regards,

Néstor Boscán

--- End Message ---
--- Begin Message ---

fre, 31 08 2012 kl. 16:33 -0430, skrev Néstor Boscán:
> Hi
> 
> What's the easiest library/technology/solution to create a web service in
> PHP based on a WSDL document?
> 
> Regards,
> 
> Néstor Boscán

This one is pretty simple to get started with :
http://www.php.net/manual/en/soapserver.soapserver.php

Best Regards
Lars Nielsen
www.lfweb.dk


--- End Message ---
--- Begin Message ---
See:
http://www.cegepsherbrooke.qc.ca/~languesmodernes/test/test.php
http://www.cegepsherbrooke.qc.ca/~languesmodernes/test/test.phps

In $mystring, I need to extract everything between "|News Releases|" and "-30".

The thing now is $mystring might contain many instances of "|News Releases|" and "-30".

How do I deal with this? My code only catches the first instance.

Thanks for you help so far.

John

You can use strpos() to find the location of "News Releases" then you
can again use strpos() to find the location of "-- 30 --" but you will
want to feed strpos() an offset for matching "-- 30 --" (specifically
the position found for "News Releases"). This ensures that you only
match on "-- 30 --" when it comes after "News Releases". Once you have
your beginning and start offsets you can use substr() to create a
substring of the interesting excerpt. Once you have the excerpt in hand
you can go back to tamouse's recommendation above.
Cheers,
Rob.


--- End Message ---

Reply via email to