|
Posted by linda on 11/01/06 19:45
"Martin Mouritzen" <martin@siteloom.dk> wrote in message
news:p9rhk258jj00kfpplptusfq3trhca9b711@4ax.com...
> 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.
I must be retaining all the information, I'm reading, because it actually
made sense when reading! Something I never thought would happen when I
started php. It all looked so hard!
>> 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
Is there any particular reason, and do you not find all the extra printing
of html a chore?
> 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).
I know what a CME is but excuse my lack of knowledge but what is a
template-engine?
> 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.
My editor colours php and html differently, so I find it easier to break
out, and maintain. But I kind of see your point!
>>P.S I like your website!
>
> Thanks! I hope you found the english version, danish tends to be a bit
;-) Yep, my Danish was never any good! I remember one ill fated trip asking
where the nearest toilet was with my phrase book, and the kindly old
gentleman escorted me to the nearest chemist. And then waited to show me
the way back! Lol... I ended up purchasing a whole host of things I didn't
need because I was too embarrassed to admit I'd got it wrong. Ummm I think
I'll leave that part of my past where it is.;-)
As you work with CMS check out this link http://www.famfamfam.com/lab/icons/
they do some amazing icons! And they're free what could be better. They
really are beautifully made. And hundreds of them to boot.
Best wishes,
Linda
Navigation:
[Reply to this message]
|