Array Plus and minus related issues

Source: Internet
Author: User
Array Plus and minus problems
Known quantity groups A and B.

Array A:
Array (

Array (
' Cust_no ' = ' 310f6 1va5a ',
' Lotno ' = ' 2X15 ',
' Part_count ' = ' 32 ',
),

Array (
' Cust_no ' = ' 310f6 1va5a ',
' Lotno ' = ' 2z25 ',
' Part_count ' = ' 32 ',
),
)

Array B:

Array (

Array (
' Cust_no ' = ' 310f6 1va5a ',
' Total ' = ' 48 ',
),
)


When the array a cust_no is 310f6 1va5a, the corresponding total is 32+32=64, and the total amount of the array B cust_no to 310f6 1va5a is 48.
What do you want to do with array A when the sum of array B is 48 o'clock? What is the remaining result of array a?

In this case,
Get the result of array A:

Array A:
Array (

Array (
' Cust_no ' = ' 310f6 1va5a ',
' Lotno ' = ' 2X15 ',
' Part_count ' = ' 32 ',
),

Array (
' Cust_no ' = ' 310f6 1va5a ',
' Lotno ' = ' 2z25 ',
' Part_count ' = ' 16 ',
),
)

Result of remaining array a:

Array A:
Array (

Array (
' Cust_no ' = ' 310f6 1va5a ',
' Lotno ' = ' 2X15 ',
' Part_count ' = ' 0 ',
),

Array (
' Cust_no ' = ' 310f6 1va5a ',
' Lotno ' = ' 2z25 ',
' Part_count ' = ' 16 ',
),
)


How can you get such a result?

Share to:


------Solution--------------------
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.