RE: [PHP] String Manipulation
| From: | Don Read | Date: | Sun, 01 Jun 2003 17:21:42 +0000 |
| Subject: | RE: [PHP] String Manipulation | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-149730@lists.php.net to get a copy of this message | ||
On 31-May-2003 S. Cole wrote:
> Hello all,
>
> I'm currently working on a site for my brother-in-law. I have written a
> script that will access a website
> (http://www.remax.nf.ca/listings.asp?a=163&cp=1) and pull the page into a
> variable ($var). I have striped the page down to include only the
> listings
<snip>
>
> What I want to do, is to be able to work with this data. I don't want to
> keep it in the same format as it's on the original site.
>
> I would like to be able to pull the listings and it's components
> separately
> so that I can change the layout, color, size, font, etc, etc, etc.
>
I'd start with :
$var=preg_replace('!<tr bgcolor=.+>!m', '[breakhere]', $var);
$listing=explode('[breakhere]', $var);
Regards,
--
Don Read dread@texas.net
-- It's always darkest before the dawn. So if you are going to
steal the neighbor's newspaper, that's the time to do it.