0
I am developing an integration to send email inside Sendinblue, but in the request it is necessary to send the HTML code of the email and only works if I put " " in front of all double quotes.
I need to get the HTML that’s like this:
> <html xmlns="http://www.w3.org/1999/xhtml">
> <head> <meta http-equiv="Content-Type" content="text/html;
> charset=utf-8" /> <title>Email para Divulção de Produto</title>
> <style type="text/css"> .corpo1 { margin-left:auto;
> margin-right:auto; width:700px; height:auto; } .produtos {
> width:340px; height:405px; float:left; } .tituloproduto { font-family:
> Verdana, Geneva, sans-serif; font-size:14px; font-style:oblique; }
> .preheader { color:#c0c0c0; font-family: arial, helvetica, sans-serif;
> font-size: 12px; } </style> </head> <body> <div align="center">
> <!-- Tabela do Corpo do Email --> <table class="corpo1"
> width="95%" border="0" cellspacing="1"
> cellpadding="1"> <!-- Pre Header --> <tr align="center">
> <td class="preheader"> Ofertas para Acabar com os Estoques </td>
Exemplifying precise declare so:
> "<html xmlns=\\\"http://www.w3.org/1999/xhtml\\\">
> <head> <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html;
> charset=utf-8\\\" /> <title>Email para Divulção de Produto</title>
> <style type=\\\"text/css\\\"> .corpo1 { margin-left:auto;
> margin-right:auto; width:700px; height:auto; } .produtos {
> width:340px; height:405px; float:left; } .tituloproduto { font-family:
> Verdana, Geneva, sans-serif; font-size:14px; font-style:oblique; }
> .preheader { color:#c0c0c0; font-family: arial, helvetica, sans-serif;
> font-size: 12px; } </style> </head> <body> <div align=\\\"center\\\">
> <!-- Tabela do Corpo do Email --> <table class=\\\"corpo1\\\"
> width=\\\"95%\\\" border=\\\"0\\\" cellspacing=\\\"1\\\"
> cellpadding=\\\"1\\\"> <!-- Pre Header --> <tr align=\\\"center\\\">
> <td class=\\\"preheader\\\"> Ofertas para Acabar com os Estoques </td>
I just took a piece of code to make it simple.
Is there a function within PHP that takes this HTML code and transforms it into JSON format?
Thank you,
How do I turn HTML into JSON? And what does that have to do with quotes escaping?
– Andre