Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. <ul class="list">
  2. <?
  3. $history = array(
  4. "p1" => array("from"=>"a", "to" => "b", "title"=>"c", "company"=>"d", "skills"=>array("s1","s2")),
  5. "p2" => array("from"=>"a", "to" => "b", "title"=>"c", "company"=>"d", "skills"=>array("s1","s2"))
  6. );
  7. foreach ($history as $v=>$k): {?>
  8. <li><em class="period"><?= $k['from']?> - <?= $k['to']?></em><strong><?= $k['title']?> as <?= $k['company']?></strong></li>
  9. <ul class='skills'>
  10. <?php foreach ($k['skills']as $print_skill):?>
  11. <li><a href=""><?= $print_skill ?> </a></li>
  12. <?php endforeach;
  13. ?></ul><?
  14.  
  15. }
  16. endforeach;
  17. ?>
  18.  
  19. </ul>
  20.  
  21.  
  22. -- running --
  23. boris@galt:~$ php x.php
  24. <ul class="list">
  25. <li><em class="period">a - b</em><strong>c as d</strong></li>
  26. <ul class='skills'>
  27. <li><a href="">s1 </a></li>
  28. <li><a href="">s2 </a></li>
  29. </ul> <li><em class="period">a - b</em><strong>c as d</strong></li>
  30. <ul class='skills'>
  31. <li><a href="">s1 </a></li>
  32. <li><a href="">s2 </a></li>
  33. </ul>
  34. </ul>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement