Skip to content

[JS] array_escape () escape an array

  • by
  1. /**
  2.   *@desc browse an array and esapce all of his filed
  3.   *@return array escaped array
  4.   */
  5.   function  array_escape(tab)
  6.   {
  7.     var key;
  8.     for (key in tab)
  9.     {
  10.       if (is_array(tab[key]))
  11.         array_escape(tab);
  12.       else
  13.         tab[key] = escape(tab[key]);
  14.     }
  15.     return(tab);
  16.   }