Hi @homax
Sorry, this question is outside the scope of this support forum.
There is no issue here with ACF, just a general WP / programing question. Please use another forum such as Stack overflow.
Thanks for understanding. Unfortunately, I do not have time to solve developer questions which are not specific to ACF.
Thanks
E