Created
August 18, 2012 14:49
-
-
Save flesch/3387199 to your computer and use it in GitHub Desktop.
Revisions
-
flesch revised this gist
Nov 22, 2012 . 2 changed files with 15 additions and 15 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ <?php class document { public static function getElementsByClassName($name) { global $xpath; $nodes = array(); $elements = $xpath->query(sprintf("//div[contains(@class, '%s')]", $name)); foreach ($elements as $e) { array_push($nodes, $e); } return $nodes; } } ?> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,15 +0,0 @@ -
flesch created this gist
Dec 7, 2010 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ <?php class document { public static function getElementsByClassName($name) { global $xpath; $nodes = array(); $elements = $xpath->query(sprintf("//div[contains(@class, '%s')]", $name)); foreach($elements as $e) { array_push($nodes, $e); } return $nodes; } } ?>