<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1020066" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1020066</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/array-dictionary-object#comment-1122314</link>
    <description> &lt;p&gt;I translated the above PHP to ASP. I did this really fast.... hope it works.&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;%&lt;br /&gt;&lt;br /&gt;&amp;#039;assuming you already pulled these values from the database&lt;br /&gt;Dim strNumberForDiscount = &amp;quot;5,10,15&amp;quot;&lt;br /&gt;Dim strDiscountPercent = &amp;quot;10,15,20&amp;quot;&lt;br /&gt;Dim fltProductCost = 3.99&lt;br /&gt;&lt;br /&gt;&amp;#039;and this would be determined by what the customer is purchasing&lt;br /&gt;Dim intPurchaseQuantity = 7&lt;br /&gt;&lt;br /&gt;&amp;#039;make them arrays&lt;br /&gt;Dim arrQuantities = Split(strNumberForDiscount, &amp;quot;,&amp;quot;)&lt;br /&gt;Dim arrPercentages = Split(strDiscountPercent, &amp;quot;,&amp;quot;)&lt;br /&gt;&lt;br /&gt;Dim fltThisDiscountPercent = 0&lt;br /&gt;Dim i&lt;br /&gt;For i=0 to UBound(arrQuantities)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If intPurchaseQuantity &amp;gt;= intQuantities(i) Then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fltThisDiscountPercent = arrPercentages(i)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Break&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;br /&gt;Next&lt;br /&gt;&lt;br /&gt;&amp;#039;determine the pre-discount total&lt;br /&gt;fltThisPurchaseAmount = fltProductCost * intPurchaseQuantity&lt;br /&gt;&lt;br /&gt;&amp;#039;determine the discount&lt;br /&gt;fltThisDiscountAmount = fltThisPurchaseAmount * (ThisDiscountPercent / 100)&lt;br /&gt;&lt;br /&gt;&amp;#039;subtract the discount&lt;br /&gt;fltThisPurchaseAmount = fltThisPurchaseAmount - fltThisDiscountAmount&lt;br /&gt;&lt;br /&gt;%&amp;gt;&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
 </description>
     <pubDate>Fri, 27 Dec 2002 20:23:36 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1122314 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/array-dictionary-object#comment-1122311</link>
    <description> &lt;p&gt;yeah i realized that after i posted.  im afraid i can be of little help there, but if ASP has a similar method to explode() to split a string into an array, converting the above to ASP should be fairly straight-forward.&lt;/p&gt;
&lt;p&gt;cheers&lt;/p&gt;
 </description>
     <pubDate>Fri, 27 Dec 2002 17:39:45 +0000</pubDate>
 <dc:creator>ROB</dc:creator>
 <guid isPermaLink="false">comment 1122311 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/array-dictionary-object#comment-1122310</link>
    <description> &lt;p&gt;Rob,&lt;/p&gt;
&lt;p&gt;That is great! But I need ASP code. I appreciate your quick response.&lt;br /&gt;
Besides that any code that has an explode() function scares me. &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
&lt;p&gt;- Mike&lt;/p&gt;
 </description>
     <pubDate>Fri, 27 Dec 2002 17:29:22 +0000</pubDate>
 <dc:creator>mycoolross</dc:creator>
 <guid isPermaLink="false">comment 1122310 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/array-dictionary-object#comment-1122309</link>
    <description> &lt;p&gt;this will surely need some tweaking, but you should get the idea&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;//assuming you already pulled these values from the database&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$NumberForDiscount &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= \&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;5,10,15\&quot;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$DiscountPercent&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = \&quot;10,15,20\&quot;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$productcost&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = &#039;3.99&#039;;&lt;br /&gt;&lt;br /&gt;// and this would be determined by what the customer is purchasing&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$purchasequantity&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = 7;&lt;br /&gt;&lt;br /&gt;// make them arrays&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$quantities&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = explode(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$NumberForDiscount&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;, &#039;,&#039;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$percentages&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = explode(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$DiscountPercent&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;, &#039;,&#039;);&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$thisdiscountpercent&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = 0;&lt;br /&gt;for(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$i&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=0; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$i&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&amp;lt;sizeof(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$quantities&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;); ++&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$i&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$purchasequantity&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; &amp;gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$quantities&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$i&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$thisdiscountpercent&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$percentages&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$i&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else break;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// determine the pre-discount total&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$thispurchaseamount&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$productcost&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; * &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$purchasequantity&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;;&lt;br /&gt;&lt;br /&gt;// determine the discount&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$thisdiscountamount&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$thispurchaseamount&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; * (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$thisdicountpercent&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; / 100);&lt;br /&gt;&lt;br /&gt;// subtract the discount&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$thispurchaseamount&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; -= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$thisdiscountamount&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;;&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;[edit]DOH! NOT ASP!!!! &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt; Sorry i won&#039;t be of much help there[/edit]&lt;/p&gt;
 </description>
     <pubDate>Fri, 27 Dec 2002 17:25:48 +0000</pubDate>
 <dc:creator>ROB</dc:creator>
 <guid isPermaLink="false">comment 1122309 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/array-dictionary-object#comment-1122308</link>
    <description> &lt;p&gt;By the way I forgot to mention this is ASP. I guess you can figure that out with the use of the dictionary object.&lt;/p&gt;
&lt;p&gt;- Mike&lt;/p&gt;
 </description>
     <pubDate>Fri, 27 Dec 2002 17:20:15 +0000</pubDate>
 <dc:creator>mycoolross</dc:creator>
 <guid isPermaLink="false">comment 1122308 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
