<input type="checkbox" name="seller[categ][<?php echo $category['category_id']; ?>]" checked="checked" value="<?php echo $category['category_id']; ?>"/>
<input type="checkbox" name="seller[categ][]" checked="checked" value="<?php echo $category['category_id']; ?>"/>
<input type="checkbox" name="seller_categ_<?php echo $category['category_id']; ?>" checked="checked" value="<?php echo $category['category_id']; ?>"/>
product.id
product.title
product.seller_id
seller.id
seller.name
seller.cat_id
SELECT * FROM product
LEFT JOIN seller ON product.seller_id = seller.id
WHERE seller.cat_id=1
$(function(){
$('#notification').on('click', '.close', function(){
$(".success").hide(200);// время закрытия 0,2 секунды. Можно изменить
});
});
$tov = mysql_query("SELECT product_id FROM oc_product_to_category WHERE category_id = $cat_id", $link);
while ($result = mysql_fetch_array($tov)) {
$productId[] = $result['product_id'];
}
$searchIn = implode(',', $productId);
$sel = mysql_query("SELECT `seller_id` FROM `oc_ms_product` WHERE product_id IN ($searchIn)" , $link);
while ($resul = mysql_fetch_array($sel)) {
echo $resul['seller_id'] . '<br>';
}
update url_alias set `keyword` = concat('shop/', `keyword`) where `query` LIKE '%product_id=%'
<?php
$a = 5;
$b = 6;
$c = '+';
echo eval("return $a $c $b;");
<?php
$a = 5;
$b = 6;
$operation = [];
$operation['+'] = function ($a, $b) {
return $a + $b;
};
$operation['*'] = function ($a, $b) {
return $a * $b;
};
// тд на все варианты
$c = '+';
echo $operation[$c]($a, $b) . PHP_EOL;
$c = '*';
echo $operation[$c]($a, $b) . PHP_EOL;
function doAction($a, $b, $action) {
switch ($action) {
case "+": return $a + $b;
case "-": return $a - $b;
case "*": return $a * $b;
case "/": return $a / $b;
default: throw new \BadFunctionCallException("Unknown action");
}
}
<?php echo doAction($a, $b, $c) ?>