你好,我有電子郵件,我發送給我的客戶看起來像: $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