【发布时间】:2015-05-14 13:18:41
【问题描述】:
您好,我向客户发送的电子邮件如下所示:
$body = '<div>my email content</div>';
我需要从 google api 将此脚本添加到 $body 变量:
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "LodgingReservation",
"reservationNumber": "abc456",
"reservationStatus": "http://schema.org/Confirmed",
"underName": {
"@type": "Person",
"name": "John Smith"
},
"reservationFor": {
"@type": "LodgingBusiness",
"name": "Hilton San Francisco Union Square",
"address": {
"@type": "PostalAddress",
"streetAddress": "333 O'Farrell St",
"addressLocality": "San Francisco",
"addressRegion": "CA",
"postalCode": "94102",
"addressCountry": "US"
},
"telephone": "415-771-1400"
},
"checkinDate": "2017-04-11T16:00:00-08:00",
"checkoutDate": "2017-04-13T11:00:00-08:00"
}
</script>
我该怎么做?有任何想法吗? 我无法将 " 更改为 '。
【问题讨论】:
标签: javascript php variables google-schemas