A circular judgment goes into a misunderstanding request guide

Source: Internet
Author: User
A circular judgment goes into a misunderstanding request guide
 $ Value) {$ show. = "$ value";} if ($ show = 3) {echo "Hello";} elseif ($ show = 11) {echo "Hello ";} else {echo "good ";}


$ Str = "3 8, 9, 10, 11,"; the position of 3 8 9 10 11 in is uncertain, that is, it will change.

3 In $ show = 3 is the number above, that is, the value after the split based on $ str is determined.

It seems that you have been confused and cannot make judgments.


Reply to discussion (solution)

$ Str = "3, 8, 9, 10, 11,"; $ array = explode (",", $ str); foreach ($ array AS $ _ key => $ value) {if ($ value = 3) {echo "Hello";} elseif ($ value = 11) {echo "Hello ";} else {echo "good ";}}

$ Show. = "$ value"; what do you do?

What do you want to do? I have to get rid of the points and connect them again. what is the number ??

Describe your requirements and expected results in detail.

It is estimated that the number is converted into the corresponding text.

 '; $ Str = "3, 8, 9, 10, 11,"; $ array = explode (",", $ str); foreach ($ array AS $ _ key => $ value) {echo show ($ value);} function show ($ v) {if ($ v = 3) {return '';} elseif ($ v = 11) {return' ';} else {return' '; }}?>

Hello, good, good

Thank you for answering your questions.

Specifically, a field in a loop exists for Type 3, 8, 9, 10, and 11, but you need to judge this

The fields in the big cycle are correct for determining the fifth floor.

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.