stoneharry

Untitled

Jun 29th, 2012
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.67 KB | None | 0 0
  1.         foreach ($details as $field)
  2.         {
  3.  
  4.             if (gettype($field) != "array")
  5.             {
  6.                
  7.                 $state2 = $doc2->createElement($names[$index]);
  8.                
  9.                 $state2->appendChild( $doc2->createTextNode( $field ) );
  10.  
  11.                 $b2->appendChild( $state2 );
  12.             }
  13.             else
  14.             {
  15.                 $single = "";
  16.                 for ($a = 0; $i < sizeof($field); i++)
  17.                 {
  18.                     $single = $single . $field;
  19.                 }
  20.                
  21.                 echo $single . "<br>";
  22.                
  23.                 $state2 = $doc2->createElement($names[$index]);
  24.                
  25.                 $state2->appendChild( $doc2->createTextNode( $single ) );
  26.  
  27.                 $b2->appendChild( $state2 );           
  28.                
  29.                 //var_dump($field);
  30.             }
  31.                
  32.             $index = $index + 1;
  33.         }  
  34.         //$b2->appendChild( $state2 );
Advertisement
Add Comment
Please, Sign In to add comment