if($this == 'that') // change the condition if you need one{ $styleid = 2; // change to the styleid you want $styleid = intval($styleid); // Get the integer value}