Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QUESTION Foreach how?
#2
does your input data change also
"$atts= $data->children();" instead of attributes , is that correct for the input data ?

It looks ok at a glance, hmm

also you are modifying your foreach value variable $data
$data = $xml->addChild('data');
use another varname like $node


PHP Code:
foreach ($testfile->data as $data
    {
                    
        
$atts$data->children();
        
$node$xml->addChild('data');
        
$node->addChild('name'$atts['name']);
                                    
    } 
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply


Messages In This Thread
Foreach how? - by smdp-1971 - 2016-11-24, 00:50:10
RE: Foreach how? - by shawn_a - 2016-11-24, 01:01:02
RE: Foreach how? - by smdp-1971 - 2016-11-24, 02:16:07
RE: Foreach how? - by smdp-1971 - 2016-12-01, 00:36:20



Users browsing this thread: 1 Guest(s)