note 63761 deleted from function.xml-parse-into-struct by cmb

From: Date: Sun, 14 Oct 2018 14:23:08 +0000
Subject: note 63761 deleted from function.xml-parse-into-struct by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-209439@lists.php.net to get a copy of this message
Note Submitter: ---- $simple = '<?xml version="1.0"?> <moldb> <molecule> <name>Alanine</name> <symbol>ala</symbol> <code>A</code> <type>hydrophobic</type> </molecule> <molecule> <name>Lysine</name> <symbol>lys</symbol> <code>K</code> <type>charged</type> </molecule> </moldb>'; $p = xml_parser_create(); xml_parse_into_struct($p, $simple, $vals, $index); xml_parser_free($p); echo "<pre>"; echo "Index array\n"; print_r($index); echo "\nVals array\n"; print_r($vals); foreach ($vals as $k => $v) { $i = 0; if (trim($v['value']) != '') { if ($arr[$i][$v['tag']] != '') { $i ++; } $arr[$i][$v['tag']] = $v['value']; } }

« previous php.notes (#209439) next »