krot

Склонение товара

Apr 14th, 2016
76
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $n=((int)$_COOKIE['cartc']);
  2. $n=$n.' '.($n%10==1&&$n%100!=11?'товар':($n%10>=2&&$n%10<=4&&($n%100<10||$n%100>=20)?'товара':'товаров'));
  3. echo '<a class="crt" href="/zakazat-tovar.html"><img src="/media/shopping.png">В корзине '.$n.'</a>';
RAW Paste Data