Last active
May 26, 2023 10:33
-
-
Save binarykore/1245fbb5ab7cc19915eb0bd44d16766a to your computer and use it in GitHub Desktop.
String Interpolation using PHP Regular Expression and Preg_Replace Function..
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
| <?php | |
| $_string = "username=admin"; | |
| $_string = preg_replace("/username\=(\w+)/",'<li>${1}</li>',$_string); | |
| echo($_string."\r\n"); | |
| //String Interpolation using PHP Regular Expression.. | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment