note 92378 deleted from function.json-encode by danbrown
| From: | danbrown@php.net | Date: | Wed, 22 Jul 2009 16:55:21 +0000 |
| Subject: | note 92378 deleted from function.json-encode by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-158580@lists.php.net to get a copy of this message | ||
Note Submitter: email at robertdewilde dot nl
----
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 '<item index="'.$mVal.'">';
else
return '<'.$mVal.'>';
break;
case self::$PARSE_PART_CLOSING:
if (is_numeric($mVal))
return '</item>';
else
return '</'.$mVal.'>';
break;
default:
return '';
}
}
// ..
?>