10.11 php
masanori
Note
masanori did not leave a note
  1. /*
  2. I need to display EVERY entry inside codepoint, not only the 1st one.
  3.  
  4. My script only displays "亜 > cp_type_ucs[4e9c] " for example.
  5. You can launch the script at that adress : http://www.grossebertha.net/simplexml.php
  6.  
  7. <codepoint>
  8. <cp_value cp_type="ucs">4e9c</cp_value>
  9. <cp_value cp_type="jis208">16-01</cp_value>
  10. </codepoint>
  11. */
  12.  
  13. echo '<b>Code Point insérés :</b><br />';
  14. $i = 0;
  15. foreach ($xml->character as $char)
  16. {
  17.     $i++;
  18.    
  19.    
  20.     echo $char->literal .' > ';
  21.    
  22.  
  23.     foreach($char->codepoint->cp_value->attributes() as $a => $b)
  24.     {
  25.         echo $a .'_'. $b .'['. $char->codepoint->cp_value .'] ';
  26.     }
  27.    
  28.    
  29.  
  30.     echo '<br />';
  31.     if ($i == 10) break;
  32. }
  33.  
Parsed in 0.030 seconds, using GeSHi 1.0.7.14

Modify this Paste