StackOverflow.
Let's say I have this variable:
$paragraph = "This is a bunch of random information. Here is a URL: http://example.com/inventory/personid Thanks for checking it out!";
I need to detect if the $paragraph has a URL in it, even if the personid
changes, and then save it as a variable, then replace it with some new code. For example, this is what I should walk away with:
$url = "http://example.com/inventory/personid";
$replace = "newinformation!";
$newparagraph = "This is a bunch of random information. Here is a URL: newinformation! Thanks for checking it out!";
I'm pretty sure this has to do with strpos(), but I have no idea past that.
Edit: personid would be represented as something along the lines of #730_2_1697061248
but the numbers would change.