webgui/www/extras/yui/examples/container/php/post.php
JT Smith 4f68a0933c added YUI and YUI-ext
fixed the resizable text area with IE problem
fixed the ad space with IE problem
merged the 7.2.0 and 7.1.4 change logs
2006-11-07 23:15:57 +00:00

32 lines
No EOL
475 B
PHP

<?php
print "data = {";
$index = 0;
foreach($_POST as $key => $value) {
print "$key:";
if (gettype($value) == "array") {
print "[";
for ($i = 0;$i < count($_POST["$key"]);$i++) {
$v = $_POST["$key"][$i];
print "\"$v\"";
if ($i < count($_POST["$key"])-1) {
print ",";
}
}
print "]";
} else {
print "\"$value\"";
}
$index++;
if ( ($index) < count($_POST) ) {
print ",";
}
}
print "}";
?>