Jump to content

Recommended Posts

I have data as below.

 

I can't do this check in the SQL because my server is still on v 4 so I have to do it in PHP code.

 

If there is a blank line linked to an order ID but that orderID also has a PayPal entry then it's ok, I want to delete it from the array.

 

However, if it hast an OrderID and everything is blank, then I want to echo it.

 

In the example below:

 

9500 is incorrect

 

9503 only has 1 row but is ok

 

the rest may have 2 or more rows but as long as 1 row has PayPal in it, then it is ok.

 

How can I loop through an array but then delete everything from the array with that ID, and then carry on looping through the array again?

 

 

9511 3 PayPal IPN Verified [Completed (Verified; £24.99)]

9511 3

9508 3 PayPal IPN Verified [Completed (Unverified; £3.99)]

9508 3

9507 3 PayPal IPN Verified [Completed (Unverified; £1.99)]

9507 3

9506 3 PayPal IPN Verified [Completed (Verified; £9.49)]

9505 3 PayPal IPN Verified [Completed (Verified; £9.49)]

9505 3

9504 3 PayPal IPN Verified [Completed (Verified; £7.99)]

9504 3

9503 3 PayPal IPN Verified [Completed (Unverified; £7.99)]

9502 3 PayPal IPN Verified [Completed (Verified; £1.99)]

9502 3

9501 3 PayPal IPN Verified [Completed (Unverified; £7.99)]

9500 3 PayPal IPN Verified [Completed (Verified; £9.49)]

9500 3

Edited by qwertyjjj
Link to comment
https://forums.phpfreaks.com/topic/270338-check-array-for-blanks/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.