1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php

$sample_property_currency_before = "";
$sample_property_currency_after  = "";
$sample_price_per_res            = "";

//Currency Position
if( "After" == $sample_property_currency_sign ) {
	$sample_property_currency_after = !empty($sample_property_currency) ?  $sample_property_currency : $sample_currency;
} 
else {
	$sample_property_currency_before = !empty($sample_property_currency) ? $sample_property_currency : $sample_currency;
}

//Price Format
if( "Dot" == $sample_price_format ) {
	$sample_price_format_result = number_format ( $sample_price, 0, ".", "." );
} 
elseif( "Comma" == $sample_price_format ) { 
	$sample_price_format_result = number_format ( $sample_price );
}
else {
	$sample_price_format_result = $sample_price;
}

//Price Per
$sample_price_per_result = !empty($sample_price_per) ? "/" . $sample_price_per : '';

//Price Results
echo $sample_property_currency_before . $sample_price_format_result . $sample_property_currency_after . $sample_price_per_result;