Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.80 KB | None | 0 0
  1. <?php
  2.  
  3. $cctprofile = ("test.xml"); // Change this to your profile name .xml
  4. $xml = simplexml_load_file($cctprofile);
  5.  
  6.  
  7. // Get each puzzle customization
  8. foreach($xml->puzzle as $puzzle){
  9.     foreach($puzzle->attributes() as $customization){
  10.         echo "$customization <br />";
  11.     }
  12. }
  13. /*
  14. $test = get_object_vars($xml->puzzle);
  15. echo "<pre>".print_r($test, true)."</pre>";
  16. */
  17. /* Get all session timestamps
  18. foreach($current_puzzle as $sessions){
  19.     foreach($session->attributes() as $session){
  20.         echo "$session <br /><br />";
  21.     }
  22. }
  23. */
  24.  
  25.  
  26. /*
  27. foreach($puzzle->session as $session){
  28.     foreach($session->solve as $solve){
  29.         print $solve." -- ";
  30.     }
  31. }
  32.  
  33.  
  34. /*
  35. foreach($xml->xpath('/puzzle[@customization=$cube]') as $puzzle){
  36.     foreach($puzzle->session as $session){
  37.         foreach($session->solve as $solve){
  38.             print $solve." -- ";
  39.         }
  40.     }
  41. }
  42. */
  43. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement