Created
October 11, 2018 02:17
-
-
Save andymagill/60ef259986fff30e71bb7633d763246e to your computer and use it in GitHub Desktop.
Why does this return empty string ?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$message = file_get_contents(__DIR__ . '/confirmation.html'); | |
$replace = array( | |
'[site_url]' => get_site_url() . '/wp-content/themes/artists-working/img/email/', | |
'[email]' => $email, | |
'[event_id]' => $event_id, | |
'[address]' => $event_address | |
); | |
foreach ($replace as $placeholder => $info) { | |
$message = str_replace($placeholder,$message, $info); | |
} | |
echo var_dump($message); // returns "" ?!?! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment