I have a PDO prepared statement which looks like this:
$STH = $DBH->("CREATE TABLE :prefixbase (table_structure)");
:prefix should be replaced with userprefix_. The resulting SQL should look like this: CREATE TABLE userprefix_base(table structure). How can I separate the placeholder from the rest of the string?
I guess you need to use regular expression or simple find-replace on your string, which after such processing can be used by PDO object as a proper SQL command.
Here is an example:
P.S. I hope I understood your request correctly.