P粉5170907482023-09-04 09:53:31
If I understand correctly, you want to allow the user to edit the text template using the following parameters
{clientName} {selectedVonderName}
Then add the actual value in the database (such as mysql data)
In this case, use str_replace to do the job
For example, if you get data from mysql database data and then assign the data as $clientName
and $selectedVonderName
, then
<?php /// other code $text=".......{clientName} ....{selectedVonderName}"; $text=str_replace("{clientName}", $clientName, $text); $text=str_replace("{selectedVonderName}", $selectedVonderName, $text); /// other code ?>