Jump to content
php.lv forumi

Ģenerēt tabulu


metal-0-1

Recommended Posts

  • Replies 30
  • Created
  • Last Reply

Top Posters In This Topic

Vari vadīties pēc šī te.

 

> Beautiful is better than ugly.

> Explicit is better than implicit.

> Simple is better than complex.

> Complex is better than complicated.

> Flat is better than nested.

> Sparse is better than dense.

> Readability counts.

> Special cases aren't special enough to break the rules.

> Although practicality beats purity.

> Errors should never pass silently.

> Unless explicitly silenced.

> In the face of ambiguity, refuse the temptation to guess.

> There should be one-- and preferably only one --obvious way to do it.

> Although that way may not be obvious at first unless you're Dutch.

> Now is better than never.

> Although never is often better than *right* now.

> If the implementation is hard to explain, it's a bad idea.

> If the implementation is easy to explain, it may be a good idea.

> Namespaces are one honking great idea -- let's do more of those!

Link to comment
Share on other sites

Nu un ko, piemēram, darīt, ja tev ir HTML tabula/unordered lists, kurā visi rowi/itemi, izņemot vienu, ielien 80 char line length robežā, bet viens ir par 5-10 chariem garāks?

Rule says 80 chars, I say fuck it - lai ir 90 chari, at least looks consistent - nav jālauž kaut kā debīli, lai tik ielīstu tajos 80 charos.

Edited by jurchiks
Link to comment
Share on other sites

Nu es problēmu risinātu savādak, nevis ar `if length == 80`. Vari uzlikt kolonas platumu kā staipīgu, atkarībā no vārda garuma.

 

Vai, `max(length(words), 80)`. Ir risinājumi, kas ir daudz elegantāki par vienu kondišionalu vienai kolonai — vajag tikai nedaudz padomāt. ;)

Link to comment
Share on other sites

$breadcrumbs = array(

'item1' => array('name' => 'Abc', 'link' => '/path/to/abc/'),

'item2' => array('name' => 'Def', 'link' => '/path/to/def/'),

'item3' => array('name' => 'Ghi', 'link' => '/path/to/ghi/'),

'item4' => array('name' => 'Omg wtf long name', 'link' => '/path/to/omg-wtf-long-name/')

);

Edited by jurchiks
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...