PHP ASCII Table Library

前端 未结 3 1812
[愿得一人]
[愿得一人] 2021-01-03 16:32

Is there a de-facto standard library for creating ASCII \"tables\" in PHP?

I want some PHP code that, when handed an array or other data structure will output tabl

相关标签:
3条回答
  • 2021-01-03 16:58

    This is what you are looking for:

    http://code.google.com/p/php-text-table/

    0 讨论(0)
  • 2021-01-03 17:01

    While it's not the defacto standard, the Zend_Text_Table component of the Zend Framework does exactly this.

    It has the added bonus of being highly configurable and modular; for example it affords you control over all sorts of formatting details. Also, it adheres to strict OOP principals, if that matters to you.

    While the fact that it is part of a larger library may be intimidating, the component is fairly decoupled, the only dependency I can see is on the Zend_Loader_PluginLoader, for its pluggable rendering engine.

    Most importantly, it fully supports UTF-8.

    0 讨论(0)
  • 2021-01-03 17:05

    Simpler than Zend\Text\Table: https://github.com/viossat/arraytotexttable

    0 讨论(0)
提交回复
热议问题