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.