Advertisement
Guest User

Untitled

a guest
Mar 2nd, 2015
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. <?php
  2.  
  3. $licenses = '"[[`license_civ_1`,0],[`license_cop_1`,1]]"';
  4.  
  5. $string = str_replace('"[[',"",$licenses);
  6. $string = str_replace(']]"',"",$string);
  7. $string = explode('],[',$string);
  8.  
  9. foreach($string as $lic) {
  10. $lic = str_replace('`','',$lic);
  11. $lic=explode(',',$lic);
  12. ?>
  13. <p><?php echo $lic[0].':';
  14. if($lic[1] == 0) {
  15. ?> <button type="button">Give License!</button> <?php
  16. }
  17. else {
  18. ?> <button type="button">Take License!</button> <?php
  19. }
  20. ?> </p>
  21. <?php
  22.  
  23.  
  24. }
  25.  
  26.  
  27.  
  28.  
  29.  
  30. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement