We have the variable $ text = "Tru-la-la"; How to convert this variable to UTF-8. I mean, the text of this variable becomes in UTF-8. Please tell me how to do it.

    1 answer 1

    iconv

    iconv("какая-Ρ‚Π°ΠΌ-ваша-исходная-ΠΊΠΎΠ΄ΠΈΡ€ΠΎΠ²ΠΊΠ°", "UTF-8", $text)