Mike088 Posted October 14, 2008 Share Posted October 14, 2008 Hey everyone I'm trying to encode a variable into UTF8 char set, I don't want the whole thing UTF8 just this variables data. How would I go about doing that? My variable as follows: $link = ("<a href=\"http://$url\blahblah">Link Here</a>"); I tried and failed with this: string utf8_encode (string $link); So all up I want to encode the variable then print/echo it. Help appreciated Quote Link to comment https://forums.phpfreaks.com/topic/128318-solved-utf8-encoding/ Share on other sites More sharing options...
Daniel0 Posted October 14, 2008 Share Posted October 14, 2008 You should just do utf8_encode($link); The "string" part is just for specifying datatypes. It means that the $link argument should be a string and that the function will return a string value. Quote Link to comment https://forums.phpfreaks.com/topic/128318-solved-utf8-encoding/#findComment-664779 Share on other sites More sharing options...
Mike088 Posted October 14, 2008 Author Share Posted October 14, 2008 You should just do utf8_encode($link); The "string" part is just for specifying datatypes. It means that the $link argument should be a string and that the function will return a string value. Thanks for that mate Quote Link to comment https://forums.phpfreaks.com/topic/128318-solved-utf8-encoding/#findComment-664791 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.