nathalie35 Posted December 4, 2007 Report Share Posted December 4, 2007 hello :) voila j ai une question, j essais de mettre au xml mais dur dur:wacko: donc je suis en trein de tester la fonction simplexml_load_file et j arrive a peu pres a afficher ce que je veux sauf un truc : <marchant> <name>truc</name> </marchant> j écrit : $merchant->name ca c est OK, par contre comment faire pour afficher : - <product_images> <image type="default">adresse de l image</image> </product_images> j ai teste cela mais ca ne fonctionne pas : $product_images->image type="default" quelqu un aurait il la soluce? Quote Link to comment Share on other sites Partagez cette page :
kazhar Posted December 4, 2007 Report Share Posted December 4, 2007 $att = $product_images->image->attributes(); echo (string)$att->type; ;) http://fr.php.net/manual/fr/function.simplexml-element-attributes.php Quote Link to comment Share on other sites Partagez cette page :
nathalie35 Posted December 4, 2007 Author Report Share Posted December 4, 2007 merci kazhar pour le lien, j y vais de ce pas Quote Link to comment Share on other sites Partagez cette page :
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.