<table>
<?php
$a = '{
"currency": {
"id": "1",
"code": "USD",
"prefix": "$",
"suffix": " USD",
"format": "2",
"rate": "1.00000"
},
"pricing": {
"com": {
"categories": [
"Popular",
"gTLD"
],
"addons": {
"dns": true,
"email": true,
"idprotect": true
},
"group": "new",
"register": {
"1": "9.95",
"2": "19.90",
"3": "29.85"
},
"transfer": {
"1": "9.95",
"2": "15.00",
"3": "25.00"
},
"renew": {
"1": "9.95",
"2": "15.00",
"3": "25.00"
}
},
"net": {
"categories": [
"Popular",
"gTLD"
],
"addons": {
"dns": false,
"email": false,
"idprotect": false
},
"group": "sale",
"register": {
"1": "9.00"
},
"transfer": {
"1": "11.95"
},
"renew": {
"1": "11.95"
}
},
"org": {
"categories": [
"Popular",
"gTLD"
],
"addons": {
"dns": false,
"email": false,
"idprotect": false
},
"group": "hot",
"register": {
"1": "11.95"
},
"transfer": {
"1": "11.95"
},
"renew": {
"1": "11.95"
}
}
}
}';
$domains = json_decode($a);
foreach ($domains->pricing as $tld => $attrs) {
echo "<tr>";
echo "<td>".$tld."</td>";
echo "<td>1yr (".$attrs->register->{1}.")</td>";
echo "<td>1yr (".$attrs->transfer->{1}.")</td>";
echo "<td>1yr (".$attrs->renew->{1}.")</td>";
echo "</tr>";
}
- Output for 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.30, 7.0.0 - 7.0.24, 7.1.0 - 7.1.33, 7.2.6 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.26, 8.4.1 - 8.4.13
- <table>
<tr><td>com</td><td>1yr (9.95)</td><td>1yr (9.95)</td><td>1yr (9.95)</td></tr><tr><td>net</td><td>1yr (9.00)</td><td>1yr (11.95)</td><td>1yr (11.95)</td></tr><tr><td>org</td><td>1yr (11.95)</td><td>1yr (11.95)</td><td>1yr (11.95)</td></tr>
- Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6
- <table>
Fatal error: Call to undefined function json_decode() in /in/H1qdm on line 84
Process exited with code 255. - Output for 4.3.3 - 4.3.11, 4.4.0 - 4.4.9
- Fatal error: Property name must be a string in /in/H1qdm on line 88
Process exited with code 255. - Output for 4.3.2
- <table>
Fatal error: Call to undefined function: json_decode() in /in/H1qdm on line 84
Process exited with code 255. - Output for 4.3.0 - 4.3.1
- <table>
Fatal error: Call to undefined function: json_decode() in /in/H1qdm on line 84
preferences:
146.66 ms | 410 KiB | 5 Q