Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 2 of 2 FirstFirst 12
Results 16 to 17 of 17
  1. #16
    New Coder
    Join Date
    Dec 2013
    Location
    Lancaster County, PA
    Posts
    10
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Thank you Philip.
    Huge help!!

  2. #17
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,105
    Thanks
    23
    Thanked 594 Times in 593 Posts
    Again infinitenothing, doing everything in PHP is easier and faster and less messy.

    PHP Code:
    <?php
    $xml
    =simplexml_load_file("http://www.xmlcharts.com/cache/industrial-metals.php");
    $i 0;
    foreach (
    $xml as $currency[]){
        if (
    $currency[$i]->attributes()->access == "zar"){
                if(
    $currency[$i]->price->attributes()->access == "aluminum"){
                            
    $first $currency[$i]->price;
                
    $big_alum_price = (float)$first .029982;
                
    $alum_price round($big_alum_price2PHP_ROUND_HALF_UP);
                   }
        }
        
    $i++;
    }
    ?>

    <!DOCTYPE html>
    <html>
    <head>
    <title>Title of the document</title>
    </head>

    <body>
    <div id="outputdiv"><?php echo $alum_price?></div>
    </body>
    </html>
    Evolution - The non-random survival of random variants.

    "If you leave hydrogen alone, for long enough, it begins to think about itself."


 
Page 2 of 2 FirstFirst 12

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •