You are here: Re: not displaying null data when using number_format « All PHP « IT news, forums, messages
Re: not displaying null data when using number_format

Posted by Martin Mouritzen on 11/01/06 19:03

On Wed, 1 Nov 2006 18:31:45 -0000, "linda" <n0spamF0rme@tiscali.co.uk>
wrote:

>Thank you for your reply, I've solved it now with a suggestion from Steve,
>but thank you anyway for replying, I am very grateful.

No problem, although I do find Steve's example a bit harder to read,
but I guess that's just habit, I do use the "((something) ? true :
false )" operator from time to time, but mostly for very short code,
as soon as the line grows I prefer an if/else statement.

> Re: the structure,
>I've never been able to decide since starting to learn php whether it is
>better to print the html or break out of php into html then back in again, I
>do know what you mean though it does look a little messy and unstructured.
>Your example definitely makes it easier to read. Point taken, and noted.
>Though with that said, I'd be interested to here others views on this,
>because as I've stated, I've been on the fence in deciding. And it's always
>useful to know the pros and con's for both, and how others feel. This way
>it will give me a better understanding of which is best. I realise that
>when you need to print large amounts of html it's better to break out of php
>to do it, but when it comes to the odd table I don't know which is best.

Well, actually I prefer never to break out of PHP at all, and if I
need to output large amounts of HTML, then I tend to use a templating
engine (but perhaps I'm a bit biased because I work on a Content
Management System with included template-engine which makes that kind
of work really easy).

But I find that when I break out of PHP to do HTML then my code
becomes harder to maintain, and I often have to rewrite the HTML to
PHP outputting HTML when editing the code later.

>P.S I like your website!

Thanks! I hope you found the english version, danish tends to be a bit
hard to read for non-danes ;-)

--
best regards,
Martin Mouritzen.
http://www.siteloom.dk

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация