shage Posted November 29, 2007 Share Posted November 29, 2007 i get a syntax error function version_compare_replacement( $version1, $version2, $operator = "" ) { if ( function_exists( "version_compare" ) ) { return version_compare( $version1, $version2, $operator ); } $version1 = strtr( $version1, "_-+", "..." ); $version2 = strtr( $version2, "_-+", "..." ); $version1 = eregi_replace( "([0-9]+)([A-Z]+)([0-9]+)", "\\1.\\2.\\3", $version1 ); $version2 = eregi_replace( "([0-9]+)([A-Z]+)([0-9]+)", "\\1.\\2.\\3", $version2 ); $parts1 = explode( ".", $version1 ); $parts2 = explode( ".", $version1 ); $parts_count = max( count( $parts1 ), count( $parts2 ) ); $i = 0; for ( ; $i < $parts_count; ++$i ) { $comparison = ( $version1, $version2, $operator ); if ( $comparison != 0 ) { return $comparison; } } return 0; } at this line $comparison = ( $version1, $version2, $operator ); Thank you Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted November 29, 2007 Share Posted November 29, 2007 What are you trying to do on that line? It makes no sense... $comparison = ( $version1, $version2, $operator ); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.