Structures_DataGrid
[ class tree: Structures_DataGrid ] [ index: Structures_DataGrid ] [ all elements ]

Source for file format.php

Documentation is available at format.php

  1. <?php
  2.  
  3. // Format UNIX timestamps as english dates:
  4. $column->format('dateFromTimestamp''m/d/y');
  5.  
  6. // Format MySQL DATE, DATETIME or TIMESTAMP strings as french dates:
  7. $column->format('dateFromMysql''d/m/y');
  8.  
  9. // Format numbers with 3 decimals and no thousands separator:
  10. $column->format('number'3'.''');
  11.  
  12. // Format numbers with 2 decimals:
  13. $column->format('number'2);
  14.  
  15. // Format using a printf expression:
  16. $column->format('printf''Number of potatoes: %d');
  17.  
  18. // Format an HTML link using a printf expression with url-encoding:
  19. $column->format('printfURL''<a href="edit.php?key=%s">Edit</a>')
  20.  
  21. ?>

Documentation generated on Mon, 11 Mar 2019 15:47:20 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.