fork download
  1. <?php
  2.  
  3.  
  4. $defaults = array(
  5. 'cols' => '60',
  6. 'class' => '',
  7. 'currentValue' => '',
  8. 'default' => '',
  9. 'group' => '',
  10. 'id' => '',
  11. 'maxlength' => '',
  12. 'name' => '',
  13. 'options' => array(),
  14. 'rows' => '00',
  15. 'size' => '60',
  16. 'text' => '',
  17. 'type' => 'text',
  18. 'value' => ''
  19. );
  20. $inputHTML = '<input type="text" name="username" id="username" class="required" size="20" maxlength="40" value="" />';
  21. $inputHTML = preg_replace( '/(' . implode( '|', array_keys( $defaults ) ) . ')=""/', '', $inputHTML );
  22. echo $inputHTML;
  23. ?>
Success #stdin #stdout 0.01s 20568KB
stdin
Standard input is empty
stdout
<input type="text" name="username" id="username" class="required" size="20" maxlength="40"  />