Determine value in range, inject to HTML to be used in CSS
Why is $lim01 never used?  Is it always equal to 1?

Only one of the subscription packs applies, if at all.  You should first make it clear which subscription pack applies.

$subscription_pack = (($x &gt;= $lim03) ? 3 :
                     (($x &gt;= $lim02) ? 2 :
                     (($x &gt;= $lim01) ? 1 : NULL)));
# Note: inactive rather than deactive
$active1 = $active2 = $active3 = 'fb-sub-inactive';
if ($subscription_pack == 1) { $active1 = 'fb-sub-active'; }
if ($subscription_pack == 2) { $active2 = 'fb-sub-active'; }
if ($subscription_pack == 3) { $active3 = 'fb-sub-active'; }


I also suggest reworking the CSS so that you can drop the fb-sub-inactive class altogether.