brown adlı üyeden alıntı: mesajı görüntüle
<?php
$argumen = array(
    'meta_key' => '_price',
    'orderby' => 'meta_value_num',
    'order' => 'ASC',
    'limit'=> -1,
    'category' => array( 'denemekategorisi' ),
    'status' => 'publish',
);
$producter = wc_get_products( $argumen );
$html = '<div class="urun"><select id="hesaplar">';
foreach ($producter as $producted) {
$urunbaslik = $producted->get_name();
$urunfiyat = number_format($producted->get_price(), 2, '.', '');
$urunid = $producted->get_id();
$urunadi = explode(" ", $urunbaslik);
$urunayrac = str_replace( array("@", "_", "."), '', $urunadi[1]);
//echo $urunayrac . ' ' . $urunfiyat;
$html .= '<option value="'.$urunayrac.'" selected>'.$urunadi.'</option>';
}
$html .= '</select></div>';
echo $html;
?>
hocam bu kod doğru ancak value kısmında 1... 2... 3... 4... 5... diye otomatik doldurma işlemini yapmamız gerekiyor