Re: [PHP] Comparison Problems with 5.2.5



You want >= and not =>

The => operator doesn't even make any sense in that context, as far
as I know...

On Sun, December 30, 2007 8:34 am, Magnus Anderson wrote:

Hi,

I have runned into a slight annoying problem with my code, that I have
never
had before.
Either I have something wrong in my code or PHP 5.2.5 that I user is
acting
weird in windows. I have recently installed PHP on my windows machine
for
local developement instead of a remote server.

What I try to do is to make an if statement betwean two string
numbers.

$_USER['level'] = The level the user has

The $_USER['level'] string is taken from the Database and is "5".

This will not work (I expect this to work since _USER['level'] is 5)
if($_USER['level'] => 5)

This will work (And I expect it to work to)
if($_USER['level'] => 6)

This will work (Not supposed to work since _USER['level'] is 5)
if($_USER['level'] > 5)

--
View this message in context:
http://www.nabble.com/Comparison-Problems-with-5.2.5-tp14547671p14547671.html
Sent from the PHP - General mailing list archive at Nabble.com.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?
.



Relevant Pages

  • Re: Tokenizer Difficulties
    ... > I've delved into the usage of the PHP Tokenizer that directly ... > PHP file. ... Without the context, you simply can't do the job right. ... the "parent context" (your visibility declarations are either in variable ...
    (comp.lang.php)
  • Re: Do people still use the .inc extension?
    ... To be safe, you can add some checks, I personnaly apply the one used in phpBB: ... in the php includes. ... if your file does some code depending on a context, which context doesn't exist if you call that file directly, yes. ... Actually, the execution of the code would be quite predictable, and, if properly coded, should fail anyway if a required variable, etc. is missing. ...
    (comp.lang.php)
  • Re: [PHP] The Context of 0
    ... [PHP] The Context of 0 ... haystack a Boolean FALSE is returned. ... [/small rant] ...
    (php.general)
  • Re: Post with redirect?
    ... and it can't be done with PHP. ... the only thing jerry got right is that it would be a lot of work. ... Because you shouldn't be quoting out of context. ...
    (comp.lang.php)
  • Re: connect to mysql
    ... PHP and MySQL on my Windows machine and set up a test ... After I opened the browser and selected the test.php, ...
    (comp.lang.php)