你好,我有电子邮件,我发送给我的客户看起来像: $body = '<div>my email content</div>';
,我需要从谷歌API添加到$ body变量此脚本:如何用JavaScript初始化php变量?
<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>
我该怎么办呢?有任何想法吗? 我不能改变“为”。
没错! !非常感谢你。 – pey22