Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Mar 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrays returning same result - Help!

    }else{
    $body .="Sale Conveyancing Costs<br/>";

    $billDetails1 = $billDetails[0];
    $body .= "<b>Fees:</b> &pound;" . $billDetails1['fees'] . "<br/>";
    $body .= "<b>VAT:</b> &pound;" . $billDetails1['vat'] . "<br/>";
    $body .= "<b>Office Copies:</b> &pound;" . $billDetails1['off_copy'] . "<br/>";
    $body .= "<b>Total<sup>(inc VAT)</sup>:</b> &pound".$billDetails1['grant_total']."<br/><br/>";

    $body .="Purchase Conveyancing Costs<br/>";

    $billDetails2 = $billDetails[0];
    $body .= "<b>Fees:</b> &pound;" . $billDetails2['fees'] . "<br/>";
    $body .= "<b>VAT:</b> &pound;" . $billDetails2['vat'] . "<br/>";
    $body .= "<b>Land Registry Fees:</b> &pound;" . $billDetails2['reg_fee'] . "<br/>";
    $body .= "<b>Search Pack:</b> &pound;" . $billDetails2['search_pack'] . "<br/>";
    $body .= "<b>Final Searches:</b> &pound;" .$billDetails2['final_search_pack'] . "<br/>";
    $body .= "<b>Total<sup>(inc VAT)</sup>:</b> &pound".$billDetails2['grant_total']."<br/><br/>";
    $body .= "<b>Stamp Duty:</b> &pound;" . $billDetails2['stamp'] . "<br/>";


    These are both found in PHP mailer and are found in an else statement...
    The if statements for the fees for purchase and sale produce the correct results, however, when put together, they have the same results, can anyone suggest why these arrays are returning the same result?

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,464
    Thanks
    8
    Thanked 1,085 Times in 1,076 Posts
    The two things in red below are the same array ...
    So $billDetails1 will be the same as $billDetails2


    $billDetails1 = $billDetails[0];
    $body .= "<b>Fees:</b> &pound;" . $billDetails1['fees'] . "<br/>";
    $body .= "<b>VAT:</b> &pound;" . $billDetails1['vat'] . "<br/>";
    $body .= "<b>Office Copies:</b> &pound;" . $billDetails1['off_copy'] . "<br/>";
    $body .= "<b>Total<sup>(inc VAT)</sup>:</b> &pound".$billDetails1['grant_total']."<br/><br/>";

    $body .="Purchase Conveyancing Costs<br/>";

    $billDetails2 = $billDetails[0];
    $body .= "<b>Fees:</b> &pound;" . $billDetails2['fees'] . "<br/>";


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •