- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
<?
$thePrice = $iblockelem[ "PROPERTIES" ][ "PRICE" ][ "VALUE" ];
$thePrice_s = '';
if(strlen(trim($thePrice))>3)
{
$priceArray = str_split($thePrice);
$priceArray = array_reverse($priceArray);
for($i = 1; $i <= count($priceArray); $i++)
{
$thePrice_s.=$priceArray[$i-1];
if(($i%3)==0)
$thePrice_s.=' ';
}
$thePrice = str_split($thePrice_s);
}
echo rtrim(ltrim(implode(array_reverse($thePrice))))
?>
Teddy_Brown 27.09.2011 16:42 # −2
<img src = "facepalm.jpg">
ZX_Spectrum 28.09.2011 10:12 # +2
04 - ...trim(...
16 - ...rtrim(ltrim(...