Created
September 7, 2016 07:21
-
-
Save steffengrahl/4505fd149e429fe76c01834e24770db1 to your computer and use it in GitHub Desktop.
This file contains 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
<form action="{{form_uri}}" method="post"> | |
<label for="ort">Ort</label> | |
<input type="text" name="ort" id="ort" value="{{ort}}"> | |
<input type="submit"> | |
</form> |
This file contains 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
<?php | |
$formular = file_get_contents('form.html'); | |
$array = array('form_uri' => 'do_something.php', 'ort' => 'automatisch eingesetzter Ort'); | |
foreach ($array as $key => $value) { | |
$formular = str_replace('{{'.$key.'}}', $value, $formular); | |
} | |
echo $formular; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment