The idea is I want to loop in the token on MYSQL and replace it with another value/ string see my preview below
https://i.stack.imgur.com/qdG4W.png
<?php
$token= $_POST["token"];
$replace_token = str_replace ("#", "new data", $token);
?>
The idea is I want to loop in the token on MYSQL and replace it with another value/ string see my preview below
https://i.stack.imgur.com/qdG4W.png
<?php
$token= $_POST["token"];
$replace_token = str_replace ("#", "new data", $token);
?>
In case i understand it right, you want to select some stuff and replace contents within a specific field? Try it with REPLACE (https://dev.mysql.com/doc/refman/5.7/en/string-functions.html#function_replace)
SELECT id, myNameField, REPLACE(myNameField,'#','newValue') as replacedField, someOtherField
FROM yourTable
WHERE yourCondition IS matched
ORDER BY yourWill
You can do it directly with sql query instead of going this way.
as per your question you want to do something like start loop for token value as its like # and url bla bla.. and you want to replace with proper value.
so just run sql query.
Update {table name} SET token {field name} = {'your respected data'};