php - Opencart test if version greater than 1.5.1.3 -


how add if statement check if opencart version greater 1.5.1.3?

this defined in index.php as:

// version define('version', '1.5.0'); 

i have tried: if((int)version >= '1.5.1.3'){ although when convert int becomes empty.

also tried same effect:

$this->data['oc_version'] = (int)str_replace('.', '', version); if($this->data['oc_version'] >= 1513){ 

do need convert int correctly perform greater/less calculations?

if(version_compare(version, '1.5.1.3', '>')) {     // code here if higher } else {     // code here if lower } 

though 1.5.1.3 branch goes 1.5.1.3.1 i'm guessing want that


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -