Created
February 23, 2012 21:10
-
-
Save chartjes/1895072 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Check to make sure that our valid fields are in there | |
$requiredFields = array( | |
'price', | |
'name', | |
'description', | |
'type', | |
'shippingCost', | |
'vendorSku' | |
); | |
$valid = true; | |
foreach ($storeData['products'] as $rawProduct) { | |
$fields = array_keys($rawProduct); | |
foreach ($requiredFields as $requiredField) { | |
if (!in_array($requiredField, $fields)) { | |
$valid = false; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment