gundambison

perbaikan 100

Feb 24th, 2020
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.90 KB | None | 0 0
  1. <?php
  2.  
  3. $vcpu = array("1 vCore (s)", "1 vCore (s)",  "2 vCore (s)");
  4.  
  5. $machine = array("Openstack KVM");
  6. $ovh = new Api( $applicationkey,                                                                                  $applicationsecret,                                                                                     $endpoint,                                                                                    $consumerkey);
  7.  
  8. $result = [$ovh->get('/price/vps/2018v1/ssd/model/model1'),
  9. $ovh->get('/price/vps/2018v1/ssd/model/model2'),
  10. $ovh->get('/price/vps/2018v1/ssd/model/model3')];
  11.  
  12. $isi ["vcpu"] = $vcpu;
  13. $isi ["machine"] = $machine;
  14. $isi ["result"] = $result;
  15. /*
  16. echo "<pre>";
  17. print_r($isi);
  18. echo "</pre>";
  19. */
  20. $s="<table>";
  21. for($i=0;$i<count($result);$i++){
  22.     $s.="<tr>";
  23.     $s.="<td>".$vcpu[$i]."</td>";
  24.     $s.="<td>".$result[$i]."</td>";
  25.     $s.="</tr>";
  26. }
  27. $s.="</table>";
  28.  
  29. echo $s;
Advertisement
Add Comment
Please, Sign In to add comment