note 58401 added to ref.xml

From: Date: Wed, 02 Nov 2005 22:44:25 +0000
Subject: note 58401 added to ref.xml
Groups: php.notes 
Request: Send a blank email to php-notes+get-98007@lists.php.net to get a copy of this message
@aerik thanks a lot for this simple to use function. @adrianus i noticed this too as soon as i used it but it is easily resolved. if anyone is using aerik's xml2array() (below) and noticed it doesn't play with with multiple nodes of the same name, here is a fix. this was only briefly tested. if anyone notices a problem with it please tell me. <? // replace $ReElements with the following: // note: only addition is changing (.*) to (.*?) causing the search // to stop at the first instance of </$1> // change $ReElements = '/<(\w+)\s*([^\/>]*)\s*(?:\/>|>(.*)<\/\s*\\1\s*>)/s'; // to --> $ReElements = '/<(\w+)\s*([^\/>]*)\s*(?:\/>|>(.*?)<\/\s*\\1\s*>)/s'; ?> ---- Manual Page -- http://www.php.net/manual/en/ref.xml.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+58401 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+58401&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+58401&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+58401&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+58401&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+58401&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+58401&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+58401&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+58401&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#98007) next »