FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » using same variable twice on same page
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: using same variable twice on same page [message #171382 is a reply to message #171375] Fri, 31 December 2010 09:57 Go to previous messageGo to previous message
Tim Streater is currently offline  Tim Streater
Messages: 328
Registered: September 2010
Karma:
Senior Member
In article <ifjdb0$r2s$2(at)news(dot)albasani(dot)net>,
The Natural Philosopher <tnp(at)invalid(dot)invalid> wrote:

> Tim Streater wrote:
>> In article <ifhj8t$1hd$2(at)news(dot)albasani(dot)net>,
>> The Natural Philosopher <tnp(at)invalid(dot)invalid> wrote:
>>
>>> August Karlstrom wrote:
>>>> On 2010-12-29 11:42, Derek Turner wrote:
>>>> > On Tue, 28 Dec 2010 22:07:55 -0700, richard wrote:
>>>> >
>>>> >> <?php if ($year="1961")
>>>> >
>>>> > This simply sets $year to "1961" and will always return 'true'
>>>> > ...which is more or less a flaw in the language design copied from C.
>>>
>>> Which is more or less a feature of clarity,....not a flaw.
>>>
>>> BASIC is the flawed language, allowing '=' to mean SET TO and EQUALS
>>> according to ambiguous context
>>>
>>> Sadly PHP copied BASICS lack of explicit typing as well.
>>
>> I don't want explicit typing. Let the language work for you.
>>
> I guess I am not lazy enough and prefer the language to do exactly what
> I tell it.

Well - there it is. So far it has :-)

--
Tim

"That excessive bail ought not to be required, nor excessive fines imposed,
nor cruel and unusual punishments inflicted" -- Bill of Rights 1689
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: AND in the if statement
Next Topic: login script using file, not mysql
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 10 17:16:14 GMT 2024

Total time taken to generate the page: 0.06108 seconds