=> and <=


Posted on 16th Feb 2014 07:03 pm by admin

So I was digging through some code when I came across the <= operator. This is the first time I've ever seen it. I felt the same way I did when I first saw a ternary statement.

What is it's purpose. I want to say it's a reverse assignment operator but that just make entirely no sense.

Just for the clueless ones reading I'll elaborate with code
Code: $someArray = array (
'keyOne' => "the value",
'keyTwo' => "the value" <= "something else", /// What in the world is going on here?
);
or this
Code: foreach ($array as $key=> $value )
while ($key <= $blah ) { /// <---------- huh?
$blah -= $key;
$str.= $value;
}

No comments posted yet

Your Answer:

Login to answer
73 Like 35 Dislike
Previous forums Next forums
Other forums

help with database debug pls
Parse error: syntax error, unexpected T_ELSE in /home/content/m/e/s/mesick/html/students/05/php/chec

printing links
Hi every1

i am connecting to a table in sql and the looping through with a while ($ var = my

How to sum these output values
Hi

I need sum the month totals
SELECT region_name, area_name ,SUM (CASE WHEN S

preg_replace question
Hello!!

I hope someone can help me with preg_replace.

I load two tables from an extern

Problems with strings containing
Hey all,

I have encountered something strange in a script. I am trying to write an XML heade

Securing a user input - need some confirmation
Hello All,

I am in the process of recoding a large proportion of an e-commerce site, one of t

how to timeout $doc = new DOMDocument()->load($url)
I am currently using this $doc->load($url) to fetch an rss feed.
If a feed takes long than

Using Curl_multi for processing multiple URLs
Hi,

I am at a loss as to how to implement this. I would like to be able to automatically assi

Character increment
Hi,

I am facing a scenario like above,but in my case i want to show up like Col A,Col B etc..

How do I get the row number from from an sql table query
Hi all

I have a table that I query and it returns a number of rows.
mysql_num_rows($query)

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash