----- Original Message -----
From: "Jade Ohlhauser" <[EMAIL PROTECTED]>
To: "PHP List" <[EMAIL PROTECTED]>
Sent: Friday, January 12, 2001 1:40 PM
Subject: Re: [PHP] mixing HTML and PHP code


> IMHO even better is:
> input_text('hello', 20, $value);
>
> that's how that would appear on our site. We order the parameters
logically
> and include a catch all final parameter that will add text to the HTML
tag.

I agree... In fact the last major project I did by myself was even better,
it was

layout_textbox(array(

    vname  => "user_name",
    desc    => "Enter your name",
    size      => 20,
    pixel_size => 120, //Just for better control in IE
    max_size => 30 ));

doesn't matter what order they go in, and the function puts
defaults in for missing variables.

you get the idea... made coding slightly longer, execution slightly
slower, but maintainince 100% faster, no more looking up queer
function definitions every time you wanted to change the size or
value of something.

Plus, when i changed all text fields in the system to simple ones
with a different stylesheet, I simply update layout_textbox function.
Couldn't use stylesheet, or buttons would be affected as well...

> On our site that would more like:
>
> (comments)
>
> (include files)
>
> (page specific variables)
>
> html();
>
> head($title);
> head_css('stylesheet.css');
> head_script('script.js);
> x('head');
>
> body($style)
> table(0, 0, 0, '100%', '', BLACK);
> tr('top'); td(); image('fire.jpg'); x('td'); x('tr');
> x('table');
>
> x('body');
> x('html');

Almost exactly the same, save it would be

layout_open_table(array(.....));

foo foo foo

layout_close_table();

Didn't think anybody out there did it the way I do :-)

Gfunk

       My name was Brian McGee,
       I stayed up listening to Queen,
       When I was seventeen.

http://www.gfunk007.com/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to