note 92378 added to function.json-encode

From: Date: Wed, 22 Jul 2009 08:25:47 +0000
Subject: note 92378 added to function.json-encode
Groups: php.notes 
Request: Send a blank email to php-notes+get-158568@lists.php.net to get a copy of this message
I had to cut this out because the message was to long. It should be added to the function below to get it working (at least for XML and get rid of errors complaining about the missing function) <?php // .. private static function toXML($mVal, $iPart = 1) { switch ($iPart) { case self::$PARSE_PART_CONTENT: return $mVal; break; case self::$PARSE_PART_OPENING: if (is_numeric($mVal)) return '&lt;item index="'.$mVal.'"&gt;'; else return '&lt;'.$mVal.'&gt;'; break; case self::$PARSE_PART_CLOSING: if (is_numeric($mVal)) return '&lt;/item&gt;'; else return '&lt;/'.$mVal.'&gt;'; break; default: return ''; } } // .. ?> ---- Server IP: 213.249.64.162 Probable Submitter: 85.150.120.108 ---- Manual Page -- http://www.php.net/manual/en/function.json-encode.php Edit -- https://master.php.net/note/edit/92378 Del: integrated -- https://master.php.net/note/delete/92378/integrated Del: useless -- https://master.php.net/note/delete/92378/useless Del: bad code -- https://master.php.net/note/delete/92378/bad+code Del: spam -- https://master.php.net/note/delete/92378/spam Del: non-english -- https://master.php.net/note/delete/92378/non-english Del: in docs -- https://master.php.net/note/delete/92378/in+docs Del: other reasons-- https://master.php.net/note/delete/92378 Reject -- https://master.php.net/note/reject/92378 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#158568) next »