foreach le alınan veriler arasına işaret koymak ?
5
●652
- 19-01-2018, 04:19:23Üyeliği durduruldu
<?php $i = 0; $len = count(get_the_category()); foreach((get_the_category()) as $category) { if ($i == $len - 1){ echo $category->cat_name' '; } else{ echo $category->cat_name . ', '; } $i++; } ?>php bilgim cok yok ama yukardaki kod işinizi görebilir - 19-01-2018, 10:46:23Merhaba, çok fazla koda gerek yok aşağıdaki 2 satır kod işinizi görecektir.ondadokuz910 adlı üyeden alıntı: mesajı görüntüle
foreach((get_the_category()) as $category) $result[] = $category->cat_name; echo implode(', ',$result); - 24-01-2018, 00:05:22o zaman echo implode(', ',$result); komutundan sonra aşağıdaki komutu ekleyin.ondadokuz910 adlı üyeden alıntı: mesajı görüntüle
unset($result);