A problem that people cannot think of when they break their heads

Source: Internet
Author: User
A problem that people cannot think of when they break their heads $ numo = "";
($ Bqno % 1 = 0 )? $ Numo = 1 :( $ bqno % 2 = 0 ))? $ Numo = 2 :( $ bqno % 3 = 0 ))? $ Numo = 3: false;
Echo $ numo;
It uses three-object operations and checks repeatedly. there is no syntax error, but why can't it be used?


Reply to discussion (solution)

Don't think about it. the code is not streamlined, the better, but also understandable.

How hard it is to be yourself

Do you have other assignments besides $ numo =?

First, you only have the first sentence $ numo = ''to assign values to $ numo; of course, $ numo is empty;
The result is not assigned to any variable here .. It has nothing to do with output...

Because your code has no value assignment at all

The answer was from a few people who were not half the bottle. even the most basic ones won't be confused here. I am ashamed of you. I have no value for anything! What $ numo = ""; is blank,
Can you sink your mind to learn the basics? no one knows if you don't exist in the world. it's so bad. how can you come in and answer a group of people who don't even count on beginners? it's disgusting!

This kind of post remains, which is truly polluting the environment.

The landlord's temper is too bad. let's say I have replied. don't scold me.
You have no results.
Let's first look at $ bquno % 1 = 0. this is true. then, this three-wood operation is complete, but it has nothing to do with $ numo. there is no value assignment. Is it wrong? after reading it, I cannot understand the relationship between $ bqno and $ numo.
In summary, $ numo is not assigned at all.
Do not reply later. so goodbye

Haha, the landlord is really interesting...

$bqno=10;$numo="";((($bqno%1==0)?$numo==1:($bqno%2==0))?$numo==2:($bqno%3==0))?$numo==3:false;var_dump($numo);echo '
';$numo=((($bqno%1==0)?$numo==1:($bqno%2==0))?$numo==2:($bqno%3==0))?$numo==3:false;var_dump($numo);

It seems wrong. this is what the landlord meant.

$bqno=10;$numo="";((($bqno%1==0)?$numo=1:($bqno%2==0))?$numo=2:($bqno%3==0))?$numo=3:false;echo $numo;

The landlord's temper is too bad. let's say I have replied. don't scold me.
You have no results.
Let's first look at $ bquno % 1 = 0. this is true. then, this three-wood operation is complete, but it has nothing to do with $ numo. there is no value assignment. Is it wrong? after reading it, I cannot understand the relationship between $ bqno and $ numo.
In summary, $ numo is not assigned at all.
Do not reply later. so goodbye


We need to know who your temper is, what your temper is, and respect for people who just want to discuss technology! I don't mean that to anyone, so I have to scold the birds! Otherwise, he will give a face.
Back to the truth, what you said makes sense. I am also skeptical about the value transfer problem. In fact, the three items here are the same as if, but I am writing this method in my experiment, currently, I use if in Write 3. after testing, the write method for the three purposes is the same as that for the if statement. here, it is not a problem for the three-purpose if statement, but a logical problem, that is, pass the value, but I cannot figure out where it is

It seems wrong. this is what the landlord meant.

$bqno=10;$numo="";((($bqno%1==0)?$numo=1:($bqno%2==0))?$numo=2:($bqno%3==0))?$numo=3:false;echo $numo;


I think it may be because I have made some logic problems. here is not a problem. In fact, if or switch is the same, but it is different in writing. this is not surprising, some of the above birds make a fuss and think that the Earth is about to blow up. they can only say that their minimum knowledge is not mastered, and they are still pretending to be a dog, which is so shameful and easy to get down.

$ Sqld = $ empire-> query ('select I * FROM hd_ecms_shop_data_1 WHERE hd_ecms_shop_data_1.id = $ ID ');
$ Bqno = 0;
While ($ bqrd = $ empire-> fetch ($ sqld )){
If ($ bqno % 1 = 0 ){
$ Num = 1;
} Elseif ($ bqno % 2 = 0 ){
$ Num = 2;
} Elseif ($ bqno % 3 = 0 ){
$ Num = 3;
}
$ Bqno ++;
?>
$ Cx = $ empire-> query ("SELECT classid, title, titleurl, productpic FROM hd_ecms_shop WHERE hd_ecms_shop.id = $ bqrd [id]");
While ($ bqrf = $ empire-> fetch ($ cx )){
?>

">" Border = "0" width = "325" height = "237"/>


}
?>
}
?>

This is my code. check whether there is an error in logic. if this error is not reported, $ num is not printed.


It seems wrong. this is what the landlord meant.

$bqno=10;$numo="";((($bqno%1==0)?$numo=1:($bqno%2==0))?$numo=2:($bqno%3==0))?$numo=3:false;echo $numo;


I think it may be because I have made some logic problems. here is not a problem. In fact, if or switch is the same, but it is different in writing. this is not surprising, some of the above birds make a fuss and think that the Earth is about to blow up. they can only say that their minimum knowledge is not mastered, and they are still pretending to be a dog, which is so shameful and easy to get down.

$ Sqld = $ empire-> query ('select I * FROM hd_ecms_shop_data_1 WHERE hd_ecms_shop_data_1.id = $ ID ');
$ Bqno = 0;
While ($ bqrd = $ empire-> fetch ($ sqld )){
If ($ bqno % 1 = 0 ){
$ Num = 1;
} Elseif ($ bqno % 2 = 0 ){
$ Num = 2;
} Elseif ($ bqno % 3 = 0 ){
$ Num = 3;
}
$ Bqno ++;
?>
$ Cx = $ empire-> query ("SELECT classid, title, titleurl, productpic FROM hd_ecms_shop WHERE hd_ecms_shop.id = $ bqrd [id]");
While ($ bqrf = $ empire-> fetch ($ cx )){
?>

">" Border = "0" width = "325" height = "237"/>


}
?>
}
?>

This is my code. check whether there is an error in logic. if this error is not reported, $ num is not printed.


You can read it yourself.

$ Num = 1; is this a value assignment statement?

According to tests, the answer to the answer on the fifth floor on the third floor, the fourth floor, and the ninth floor on the fifth floor is correct. In addition, the question is not a problem in writing the three items, but not passing the value.

Original saying
The Earth seems to be exploding, but they can only say that their minimum knowledge is not mastered, and they are not ashamed to pretend to be a dog.

It's a silly boy. you can break your head with a simple operator problem, and you can see this post when you grow up, you will surely regret what you did.

In the end, CSDN is enough to compete for popularity.

It's just a few bad words.

As you do, you will only get jealous of your knowledge. the more you scold, the more angry you are. the more angry you are, the less angry you are. the more angry you are, the more angry you are. the more angry you are, the more angry you are.

This is really a bit ····

As you do, you will only get jealous of your knowledge. the more you scold, the more angry you are. the more angry you are, the less angry you are. the more angry you are, the more angry you are. the more angry you are, the more angry you are.


Cut, scold you for being happy. As for how you feel, it's a fart! You can't die, huh, well, I have never seen you get angry with me. you are not as good as air, it's just a virtual thing,

As you do, you will only get jealous of your knowledge. the more you scold, the more angry you are. the more angry you are, the less angry you are. the more angry you are, the more angry you are. the more angry you are, the more angry you are.


There are very few cool people like you, but there are also some. when you encounter it, it is like stepping on the shit.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.