if ($avs_code == 'YYY' || $avs_code == 'YYA' || $avs_code == 'NYZ' || $avs_code == 'YNA') {
     // print "Congratulations your Transaction has been: $result[r_approved]<br>\n";
     // print "Transaction Code: $result[r_code]<br><br>\n";
     // subscription completed card validated
     echo '<ol>';
     echo "<li><h3>We've confirmed your card, that's great!</h3></li>";
     setRequestInLog($orderId[0], $consumer_id, $subscriptiontype_id, $subscribertype_id, $requestXML, 'preauth');
     setResponseInLog($orderId[0], $consumer_id, $subscriptiontype_id, $subscribertype_id, $returnString, 'preauth-Response');
     // if card id validated...do post auth for money deduction from card
     $myorder["ordertype"] = "postauth";
     $xml_post = $mylphp->buildXML($myorder);
     $requestXML_post = htmlspecialchars($xml);
     $result_post = $mylphp->curl_process($myorder);
     # use curl methods
     //responsexml
     $responseStr_post = displayString($result_post);
     if ($result_post["r_approved"] != "APPROVED") {
         echo '<li> <h3> Oh, no, there has been and error.  Can you try again?</h3> </li>';
         echo ' If you need help, contact support@techmatcher.com ';
         //print "Status:  $result[r_approved]<br>\n";
         //print "Error:  $result[r_error]<br><br>\n";
         setRequestInLog($orderId[0], $consumer_id, $subscriptiontype_id, $subscribertype_id, $requestXML_post, 'postauth');
         setResponseInLog($orderId[0], $consumer_id, $subscriptiontype_id, $subscribertype_id, $responseStr_post, 'postauth-Response');
     } else {
         //                    $record = getSubscriptionRecordView($consumer_id);
         //                     //setting value in subscription history table
         //                     if(isset($subscriptiondesc) && $subscriptiondesc != '' && $record == false) {
         setSubscriptionRecord($consumer_id, $subscriptiontype_id, $subscribertype_id);
         //                    }
         //           send email
         if (isset($_SESSION['consumer']['itconsumername'])) {
<?php

require_once 'functions.php';
//test of 1
echo "<br/>1---------------------------------------------<br/>";
$color1 = array('white', 'green', 'red', 'blue', 'black');
echo displayString($color1);
echo "<br/>2---------------------------------------------<br/>";
//test of 2
$color2 = array('white', 'green', 'red');
echo displayUnorderedList($color2);
echo "<br/>3---------------------------------------------<br/>";
//test of 3
$ceu = array("Italy" => "Rome", "Luxembourg" => "Luxembourg", "Belgium" => "Brussels", "Denmark" => "Copenhagen", "Finland" => "Helsinki", "France" => "Paris", "Slovakia" => "Bratislava", "Slovenia" => "Ljubljana", "Germany" => "Berlin", "Greece" => "Athens", "Ireland" => "Dublin", "Netherlands" => "Amsterdam", "Portugal" => "Lisbon", "Spain" => "Madrid", "Sweden" => "Stockholm", "United Kingdom" => "London", "Cyprus" => "Nicosia", "Lithuania" => "Vilnius", "Czech Republic" => "Prague", "Estonia" => "Tallin", "Hungary" => "Budapest", "Latvia" => "Riga", "Malta" => "Valetta", "Austria" => "Vienna", "Poland" => "Warsaw");
displayCapitalList($ceu);
echo "<br/>4---------------------------------------------<br/>";
//test of 4
$x = array(1, 2, 3, 4, 5);
print_r(deleteElementByKey($x, 0));
echo '<br/>';
print_r(deleteElementByKey($x, 3));
echo "<br/>5---------------------------------------------<br/>";
//test of 5
$color = array(4 => 'white', 6 => 'green', 11 => 'red');
echo getFirstElement($color);
echo "<br/>7---------------------------------------------<br/>";
//test of 7
$x = array(1, 2, 3, 4, 5);
print_r(insert("\$", $x, 2));
echo "<br/>8---------------------------------------------<br/>";
//test of 8