SELECT goods.name, opt.val FROM 'goods' INNER JOIN 'options' ON opt_goods_id=goods_id
$a = [...];
$b = [];
foreach ($a as $item) {
if (!array_key_exists($item['goods_name'], $b)) {
$b[$item['goods_name']] = [];
}
if (!in_array($item['opt_val'], $b[$item['goods_name']])) {
$b[$item['goods_name']][] = $item['opt_val'];
}
}
/*
----------------------
МУЛЬТИЯЗЫЧНОСТЬ
----------------------
*/
if ( $_GET["func"] == "GetString" )
{
if ( isset($_GET["lang"]) && isset($_GET["string"]) )
{
$array = parse_ini_file( $_GET["lang"].".ini" );
echo $array[ $_GET["string"] ];
}
else echo "параметры отсутсвуют!";
}
?>