RE: [PHP] [SOLVED] class to generate Javascript Object ??
| From: | Andrea Giammarchi | Date: | Sun, 04 Oct 2009 18:12:59 +0000 |
| Subject: | RE: [PHP] [SOLVED] class to generate Javascript Object ?? | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-298571@lists.php.net to get a copy of this message | ||
> Thank you, worked beautifully.
just don't ignore this:
PHP 5 >= 5.2.0
if you are trying to create something portable, you should consider a Pear fallback ...
if(!function_exists('json_encode')){
require_once 'JSON.phps';
// http://mike.teczno.com/JSON/JSON.phps
function json_encode($o){
$json = new Services_JSON;
return $json->encode($o);
}
}
Regards
_________________________________________________________________
Windows Live Hotmail: Your friends can get your Facebook updates, right from Hotmail®.
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_4:092009