Jun 26

PHP Code Highlight Test

Category: General B.S.
  1. <?
  2.  
  3. class c_HiddenVars {
  4.  
  5. function display($a) {
  6. $c = Count($a);
  7. for ($i = 0, Reset($a); $i < $c; $i++, Next($a)) {
  8. $k = Key($a); $v = $a[$k];
  9. if (is_array($v)) {
  10. $vc = Count($v);
  11. for (Reset($v), $vi = 0; $vi < $vc; $vi++, Next($v)) {
  12. $vk = Key($v);
  13. echo “<input type=hidden name=\”$k\[$vk\]\” value=\”.htmlspecialchars($v
  14. [$vk]). \”>\n;
  15. }
  16. } else {
  17. echo “<input type=hidden name=\”$k\” value=\”.htmlspecialchars($v). \”>\n;
  18. }
  19. }
  20. }
  21.  
  22. function get() {
  23. global $HTTP_GET_VARS;
  24. if (is_array($HTTP_GET_VARS)) { $this->display
  25. ($HTTP_GET_VARS); }
  26. }
  27.  
  28. function post() {
  29. global $HTTP_POST_VARS;
  30. if (is_array($HTTP_POST_VARS)) { $this->display
  31. ($HTTP_POST_VARS); }
  32. }
  33.  
  34. function all() {
  35. $this->get();
  36. $this->post();
  37. }
  38. };
  39.  
  40. ?>

1 Comment so far

  1. chris June 26th, 2006 7:20 pm

    Coding worked!

Leave a comment

You must be logged in to post a comment.