CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> Español

 Php

Print topic Send  topic

Author Message
Rogers
Posted: 08/28/2006, 9:12 PM

e batallado con este codigo , miren tengo un archivo .xml , con varia informacion como esta:
algo asi:
<house name="Small Street II">  
<tile x="146" y="43" z="7"/>   
</house>  
<house name="Small Street III">  
<tiles fromx="143" fromy="43" fromz="6" tox="144" toy="45" toz="6"/>

algo asi esta y mi codigo de php es:
foreach($houseXML->house as $house)
necesito ke solo lea la casa ke le pedi ..
aver si algien me puede ayudar, creo ke lo explike mas o menos

 $houseXML = simplexml_load_string(file_get_contents($file));  
 foreach($houseXML->house as $house)  
    {  
$house_name = $house['name'];  
 $tile_count = 0;  
foreach($house->tile as $tile)  
        {  
            $tile_count++;  
        }

algo asi esta pero solo me importa ke no sea foreach, solo una casa

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.