note 9913 added to preg_match_all

From: Date: Thu, 30 Nov 2000 19:32:17 +0000
Subject: note 9913 added to preg_match_all
Groups: php.notes 
Request: Send a blank email to php-notes+get-8304@lists.php.net to get a copy of this message
//This example will list (actually put on an array) all the urls adresses from a specific $url, where $url = "http://www.whatever.com" $url = "http://www.catho.com.br/index.phtml"; $contents = Implode("", File($url)); preg_match_all("|href=\"?([^\"' >]+)|i", $contents, $arrayoflinks); //Listing the array While(List(,$link) = Each($arrayoflinks[1])) Echo "$link<BR>"; http://www.php.net/manual/function.preg-match-all.php

« previous php.notes (#8304) next »