addAttachment($path, $name, $encoding, $type);
function foo($arg) {
$results = [];
for ($i = 0; $i < count($arg); $i++) {
if ($arg[$i] % 2 == 0) {
$results[] = $arg[$i];
}
}
return $results;
}
$test1 = [4, 5, 8, 12, 9];
print_r(foo($test1));
if((++$counter) % 7 == 0)
<?php
? $json = file_get_contents('php://input');
$terms_post = get_the_terms( $post->cat_ID , 'product_cat' );
foreach ($terms_post as $term_cat) {
{
if($term_cat->term_id == 18)
{
echo 'Встречается 18, поздравляем!';
}
if($term_cat->term_id == 20)
{
echo 'В строке найдено 20, это тоже не плохо';
}
}