0
変数の値が配列内にあるかどうかを確認しようとしています。いくつかの困難を抱えている。私の配列はglobal.asaに保存されています。古典的なASP配列の変数を確認してください
Dim aTree(5)
aTree(0) = "a"
aTree(1) = "b"
aTree(2) = "c"
aTree(3) = "d"
aTree(4) = "e"
aTree(5) = "f"
Application("aTree") = aTree
私はこの不格好なバージョンを持っている私は、チェックをこのよう
<% tree = Request("tree")
if in_array(tree, aTree) then %>
You've found it
<% End if %>
をやろうとしている店にいくつかのHTMLコンテンツ
<% If tree = "a" Then %>
<div class="card bg_white">
<h1 class="bold small-caps tbrown">my content</h1>
</div>
<% End If %>
をチェックしようとしている変数その作品
(tree <> "" and tree <> "a" and tree <> "b" and tree <> "c" and tree <> "d" and tree <> "e" and tree <> "f")
Bu私は配列でそれを行うよりエレガントな方法が欲しいです。
リトルヘルプ。ありがとう。