Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $licenses = '"[[`license_civ_1`,0],[`license_cop_1`,1]]"';
- $string = str_replace('"[[',"",$licenses);
- $string = str_replace(']]"',"",$string);
- $string = explode('],[',$string);
- foreach($string as $lic) {
- $lic = str_replace('`','',$lic);
- $lic=explode(',',$lic);
- ?>
- <p><?php echo $lic[0].':';
- if($lic[1] == 0) {
- ?> <button type="button">Give License!</button> <?php
- }
- else {
- ?> <button type="button">Take License!</button> <?php
- }
- ?> </p>
- <?php
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement