I have a posttype which shows employees. The employees are shown on different pages and need to have a specific content text for each separate page. For this I have created a repeater with a text field and relationship field in which I select the page.
I have made a while regular while loop with an if condition to try only and show the row related to the page id, but it loops out all rows.
The = in if ( $page_id = $employee_subject_description_subject->ID ) should be changed to === to compare that the two values are equal. Your single = is actually assigning the value of $employee_subject_description_subject->ID to the $page_id variable.