Re: explode or array
| From: | Folke Ashberg | Date: | Mon, 27 Nov 2000 13:08:35 +0000 |
| Subject: | Re: explode or array | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-27359@lists.php.net to get a copy of this message | ||
Hi!
$erpr="#(.*) - (.*) url is (http://.+)#i";
preg_match_all($expr,$text_tosearch_in,$matchin);
for($i=0;$i<count($matchin[1]);$i++)
{
print "
Singer: {$matchin[$i][1]}<BR>
Song: {$matchin[$i][2]}<BR>
URL: {$matchin[$i][3]}<BR>
";
}
Happy grep!
regards
Folke
--
Folke Ashberg
Stage Internet Services GmbH
Technical Development
folke@fanstage.de
folke@fanstage.de | Tel: +49 89 454591-77 | Fax: +49 89 454591-71
Kreillerstr. 21 | 81673 Munich | Germany | www.fanstage.de
On Sat, 25 Nov 2000, Huseyin wrote:
> hi i am new to php
> lets say i grap the top 10 mp3's from some site. how can i seperate each of
> them so i'll have singer, song and the url for all mp3's. and i want to set
> some variables equal to singer, song and url. For example
> madonna - frozen url is http://www.madonna.com
> beatles - yesterday url is http://www.beatles.com
> i want singer = madonna, song=frozen and url = http://www.madonna.com
> and the same for second mp3. I want to do this for as many mp3 links are
> there on the page. I want to do this so i can add it to my database
> thanks
>
>
>
>