on 8/7/01 9:40 AM, Renze Munnik at [EMAIL PROTECTED] wrote:

>> a couple things.
>> although i agree with the general notion of using braces, return is not a
>> function (the manual calls it a statement), and atleast from what i can find
>> in the manual it doesn't take braces.
>> http://www.php.net/manual/en/functions.returning-values.php
>> also from that page - "You can't return multiple values from a function, but
>> similar results can be obtained by returning a list."
>> i'm not really sure what the difference is between function, statement and
>> language construct (which is what echo is). syntactically, i know that
>> functions require parentheses.
>> with echo, the manual says you _cannot_ use parantheses if you are echoing
>> more than one thing.
>> http://www.php.net/manual/en/function.echo.php
>> -- mike cullerton
> You're right, return is a statement.
> I never said, though, to use braces with echo. Actualy I didn't say
> anything about echo. I never use echo, for some weird reason I just
> don't like it. I prefer print. So... I don't realy care how echo
> should be used.

i don't use echo either. i use printf. i was just trying to pass along some
things i learned reading the manual that were related to the topic.

> But you'll have to admit, using braces makes things a lot easier.

i already did.

> And because what this was all about was JavaScript (and not PHP),
> using braces is a smart thing, because in JavaScript you can make
> realy ugly constructions in which things _can_ go wrong (no syntax
> error, but _wrong_) if you don't use braces. In JavaScript it's not
> required to end each line with a semicolon like in PHP. This can
> cause weird flows if you also don't use braces.

cool, i came in late in the thread. i _do_ use braces. i like braces. braces
are my friends.

> And ehhhh, who said anything about returning multiple values?

again, just something learned from the manual.

> To be honest... I don't understand what you try to achieve with your
> post.... Please let me know...

i was only trying to pass on info about differences between function calls,
statements and constructs, and hopefully helping someone out in the process.

isn't that what we do here?


-- mike cullerton

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