Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE HTML>
- <html>
- <head>
- <title>PHP function availability check</title>
- <link href="style.css" rel="stylesheet" type="text/css">
- <link rel="stylesheet" href="colorbox.css" />
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
- <script src="jquery.colorbox.js"></script>
- <script>
- $(document).ready(function(){
- $(".iframe").colorbox({iframe:true, width:"80%", height:"80%"}); // My work
- });
- </script>
- </head>
- <body>
- <?php
- error_reporting(E_ALL);
- include_once('simple_html_dom.php');
- $html = file_get_html('http://php.net/quickref.php');
- $arr = array();
- $prevLabel = null;
- foreach($html->find('#quickref_functions') as $element)
- {
- foreach($element->find('a') as $element1)
- {
- $currLabel = strtoupper(substr($element1->plaintext, 0, 1));
- if( $currLabel !== $prevLabel )
- {
- echo "<div style='border:1px solid red;margin:10px 0;'>";
- echo $currLabel;
- echo '</div>';
- $prevLabel = $currLabel;
- }
- echo "<span class='phpfun'>";
- echo "<a class='iframe' href='http://php.net".$element1->href."'>", $element1->plaintext,"</a>";
- echo '</span>';
- }
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement