0

Hi I need to encode something like this ,

< html>< body>foo< /body>< /html>

into something like this

data:text/html;charset=utf-8,%3Chtml%3E%3Cbody%3Efoo%3C/body%3E%3C/html%3E

I am not sure how to explain this but I need it for doing something like this.
Html code as IFRAME source rather than a URL

and I need a php function to do so.
Thanks in advance .

Community
  • 1
  • 1
Kartik Prasad
  • 735
  • 7
  • 18

1 Answers1

1

Take a look at : rawurlencode it encodes the given string according to » RFC 3986.

robinef
  • 302
  • 1
  • 7