note 86777 added to function.xml-parse-into-struct

From: Date: Mon, 03 Nov 2008 12:36:48 +0000
Subject: note 86777 added to function.xml-parse-into-struct
Groups: php.notes 
Request: Send a blank email to php-notes+get-146085@lists.php.net to get a copy of this message
@ dale at ucsc dot edu I modified your code for entries like <caption>Value</caption> <?php $o=''; foreach( $vals as $tag ){ //tab space: for($i=1; $i < $tag['level'];$i++) $o.="\t"; if($tag['type']!='close'){ if($tag['type']!='cdata') $o.='<'.$tag['tag']; if(isset($tag['attributes'])){ foreach($tag['attributes'] as $attr=>$aval){ $o.=' '.$attr.'="'.$aval.'"'; } } if($tag['type']!='cdata'){ $o.=($tag['type']=='complete' && (!isset($tag['value']) || $tag['value']==''))?'/>':'>'; } $o.=(isset($tag['value']))?$tag['value']:''; if($tag['type']!='cdata'){ $o.=($tag['type']=='complete' && (isset($tag['value']) && $tag['value']<>''))?'</'.$tag['tag'].'>':''; } $o.="\n"; }else{ $o.='</'.$tag['tag'].'>'."\n"; } } ?> ---- Server IP: 195.207.10.20 Probable Submitter: 87.65.57.231 ---- Manual Page -- http://www.php.net/manual/en/function.xml-parse-into-struct.php Edit -- https://master.php.net/note/edit/86777 Del: integrated -- https://master.php.net/note/delete/86777/integrated Del: useless -- https://master.php.net/note/delete/86777/useless Del: bad code -- https://master.php.net/note/delete/86777/bad+code Del: spam -- https://master.php.net/note/delete/86777/spam Del: non-english -- https://master.php.net/note/delete/86777/non-english Del: in docs -- https://master.php.net/note/delete/86777/in+docs Del: other reasons-- https://master.php.net/note/delete/86777 Reject -- https://master.php.net/note/reject/86777 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#146085) next »