Здравейте, имам проблем отново но този път с ltrim, показва последната проверка другите просто не излизат, другото което е че не излиза и . "cm".
Някаква идея? [/code]
Код:
$p['price1'] = 100;
$p['price2'] = 200;
$p['price3'] = 300;
$prices = ltrim(number_format($p['price1'], 0), '0') > 0 ? ltrim(number_format($p['price1'], 0), '0'). "x" : null . '' . ltrim(number_format($p['price2'], 0), '0') > 0 ? ltrim(number_format($p['price2'], 0), '0'). "x" : null .''. ltrim(number_format($p['price3'], 0), '0') > 0 ? ltrim(number_format($p['price3'], 0), '0'). "x" : null . "cm";
echo $prices;
Някаква идея? [/code]