What is the easiest way to modify something with PHP. suppose $link = http://www.example.com so what to do to modify this link and announce it in a new variable like this> $link_modified = http://my_example.com/go.html?http://www.example.com , can I use str_replace in this case or any other idea?
-
1Why do you think you cannot modify it - this does not seem to be your real questionAdrian Cornish– Adrian Cornish2012-09-06 04:48:11 +00:00Commented Sep 6, 2012 at 4:48
-
Why would you use medium-grade artillery like str_replace, when all you're doing is a simple string concatenation?Marc B– Marc B2012-09-06 04:59:56 +00:00Commented Sep 6, 2012 at 4:59
-
this is why, while fetching content i wanna modify all those links URL address automatically, but can not understand how to do it.. any idea?user1642787– user16427872012-09-06 05:03:00 +00:00Commented Sep 6, 2012 at 5:03
-
regex will be your best friendStrikeForceZero– StrikeForceZero2012-09-06 05:26:34 +00:00Commented Sep 6, 2012 at 5:26
-
@StrikeForceZero any example?user1642787– user16427872012-09-06 06:16:10 +00:00Commented Sep 6, 2012 at 6:16
|
Show 7 more comments