home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / Servidores / xampp-win32-1.6.7-installer.exe / phpMyAdmin / libraries / transformations / application_octetstream__hex.inc.php < prev    next >
Encoding:
PHP Script  |  2008-06-23  |  663 b   |  29 lines

  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /**
  4.  *
  5.  * @version $Id: application_octetstream__hex.inc.php 10239 2007-04-01 09:51:41Z cybot_tm $
  6.  */
  7.  
  8. /**
  9.  *
  10.  */
  11. function PMA_transformation_application_octetstream__hex($buffer, $options = array(), $meta = '') {
  12.     // possibly use a global transform and feed it with special options:
  13.     // include './libraries/transformations/global.inc.php';
  14.     if (!isset($options[0])) {
  15.         $options[0] = 2;
  16.     } else {
  17.         $options[0] = (int)$options[0];
  18.     }
  19.  
  20.     if ($options[0] < 1) {
  21.         return bin2hex($buffer);
  22.     } else {
  23.         return chunk_split(bin2hex($buffer), $options[0], ' ');
  24.     }
  25.  
  26. }
  27.  
  28. ?>
  29.