Knee pain when squatting but not when walking or standing can be caused by the following reasons: First, patellofemoral arthritis, patients with patellofemoral arthritis can have symptoms of knee pain when walking and can have friction pain at the patellofemoral joint, which should be diagnosed and treated by examining x-rays and CT of the knee joint. Second, damage to the meniscus of the knee joint. When the posterior horn of the meniscus of the knee joint is damaged or torn, there may be pain on the posterior side of the knee joint when squatting, but not when walking or standing, and MRI of the meniscus should be examined for diagnosis and treatment. Third, knee ligament injury, when the patellar ligament or the quadriceps tendon of the knee joint is damaged and causes inflammation, it can appear that the knee hurts when squatting but not when standing or walking, then it is necessary to examine the body and examine the MRI of the knee joint for diagnosis.