Get Only Price of Ad
Hi everyone!
Thinking about how to put only the price (without currency) of an Ad inside a PHP variable?
I've seen this: cp_get_price( $post->ID, 'cp_price' );
But this function outputs also the currency. Tried also with:
$string = cp_get_price( $post->ID, 'cp_price' );
preg_replace( '/[^0-9]/', '', $string );
But I can't get the price without the currency!
Is there a function? I just want a variable like
$price = 199;