0

I've created a pdf generator from Wordpress content, which works great. But one of the problems I have is replacing characters with php... I'm really hoping there's just a big list that I can copy and paste, does one exist, hopefully in the format below?

Here's an example of my list (that I've just started):

    $str=array(
    '“' => '"',
    '”' => '"',
    '„' => '"',
    '…' => '...',
    '’' => '\'',
    '–' => '-',
    ' ' => ' '
    );

Or is there a function or easier way to do this? I don't want to manually enter a billion codes.

1 Answer 1

2

html_entity_decode will convert all HTML entities to their applicable characters.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.