Guest User

Untitled

a guest
May 22nd, 2018
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.81 KB | None | 0 0
  1.     function index_content()
  2.     {
  3.         $string = <<<END
  4.         <div id="container2">
  5.         <div id="container1">
  6.             <div id="col1">
  7.             <!-- First column - Editorial -->
  8.                 <h2>Letter from the Editor</h2>
  9.                 <br/><p>
  10. END;
  11.         $string .= file_get_contents('editorial.txt');
  12.         $string .= <<<END
  13.             </p></div>
  14.             <div id="col2">
  15.             <!-- Second Column - News -->
  16.                 <h2>Recent News</h2>
  17. END;
  18.         $news = file('news.txt');
  19.        
  20.         foreach ($news as $story_split)
  21.         {
  22.             $story = explode("&&",$story_split);
  23.            
  24.             foreach ($story as $story_print)
  25.             {
  26.                 $story_print = explode('|',$story_print);
  27.                 $string.=<<<END
  28.                 <p><strong>$story_print[0]</strong><br/>
  29.                 $story_print[1]<br/>
  30.                 $story_print[2]</p>
  31.                 <hr/>
  32. END;
  33.             }
  34.  
  35.         }
  36.        
  37.             $string .=<<<END
  38.             </div>
  39.         </div>
  40.     </div>
  41. END;
  42.         return $string;
  43.     }
Add Comment
Please, Sign In to add comment