I wonder if anyone can help?
I have some PHP which works fine, however I need it to only run if there is no text field on the page.
Is there a way in PHP that I can create an IF command that sees if there is a text input or if there is a certain element class and then either stops running the code if true or carries on if false.
Here is the code I need to run only if there is no text input field.
foreach ($_option->getValues() as $value1) {
$resulta[$value1['option_type_id']]=$value1['sku'];
$result = array_filter($resulta);
}
Does that make sense?
Many thanks in anticipation
Aucun commentaire:
Enregistrer un commentaire