note 82865 added to ref.xml
| From: | galendotsenoglesatgmaildotcom at osu1 dot php dot net | Date: | Tue, 29 Apr 2008 20:48:24 +0000 |
| Subject: | note 82865 added to ref.xml | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-138915@lists.php.net to get a copy of this message | ||
An update to the function below. Fixes a bug where the data of the first tag, would occasionally
get appended to the beginning of the tag data of the second tag.
<?php
foreach($dom['child_nodes'][0]['child_nodes'] as $key => $value) {
$tagname = $value['tag_name'];
if(isset($value['child_nodes'][0])) {
$numarrays = count($value['child_nodes']);
if($numarrays > 1) {
$contents = "";
foreach($value['child_nodes'] as $key => $value2) {
$contents .= $value2;
}
}else {
$contents = $value['child_nodes'][0];
}
}else {
$contents = 'isempty';
}
$artmp = array($tagname => $contents);
array_push_associative($xmlarray,$artmp);
unset($artmp);
}
?>
----
Server IP: 208.69.120.35
Probable Submitter: 24.199.49.211
----
Manual Page -- http://www.php.net/manual/en/ref.xml.php
Edit -- https://master.php.net/note/edit/82865
Del: integrated -- https://master.php.net/note/delete/82865/integrated
Del: useless -- https://master.php.net/note/delete/82865/useless
Del: bad code -- https://master.php.net/note/delete/82865/bad+code
Del: spam -- https://master.php.net/note/delete/82865/spam
Del: non-english -- https://master.php.net/note/delete/82865/non-english
Del: in docs -- https://master.php.net/note/delete/82865/in+docs
Del: other reasons-- https://master.php.net/note/delete/82865
Reject -- https://master.php.net/note/reject/82865
Search -- https://master.php.net/manage/user-notes.php