jim9 Posted April 25, 2012 Share Posted April 25, 2012 Hi, I have this code <?php $description = get_post_meta($post->ID, "mabp_description", true); if ((strlen($description) > 300)) { echo substr($description, 0, 300)." .."; } else echo $description; ?> on http://flash-games-free.net/arabic/ for some reasons it displaying strange letter at the end of the letters group. I have attached an image to explain the idea in a better way. this is cause the page not to validate http://validator.w3.org/check?uri=http%3A%2F%2Fflash-games-free.net%2Farabic%2F&charset=%28detect+automatically%29&doctype=Inline&group=0 Could you please help me to sort out this issue. Thanks Link to comment Share on other sites More sharing options...
justsomeguy Posted April 25, 2012 Share Posted April 25, 2012 When you're working with multiple-byte character sets you should be using the mbstring functions: http://www.php.net/manual/en/book.mbstring.php Link to comment Share on other sites More sharing options...
jim9 Posted April 26, 2012 Author Share Posted April 26, 2012 The validation page is showing green now Many thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now