A student who is a resident of real property detached from a school district may choose to attend school in that district or in the district to which the property is annexed. For purposes of determining average daily attendance under Section 48.005, the student shall be counted in the district to which the property is annexed. If the student chooses to attend school in the district from which the property is detached, the state shall withhold any foundation school funds from the district to which the property is annexed and shall allocate to the district in which the student is attending school those funds and the amount of funds equal to the difference between the state funds the district is receiving for the student and the district's cost in educating the student.
Tex. Educ. Code art. 49.311