-1
$editThisUrl = "<li><a href=\"".$path.$file."\">$file</a></li>";
echo $editThisUrl;

So I'm trying to parse "index.php/admin/" out of $editThisUrl above-I can't get the regex right. I'm working with pretty rigid pathings inside a CMS, any ideas? thanks for your help

Jake S
  • 1
  • 1
  • 1
    I don't understand the question. can you give an example. – John Sobolewski Dec 13 '11 at 20:17
  • $editThisUrl looks like this: `http://test.example.net/index.php/admin/downloads/HPIM0276%20Alll%20Day%20Long.JPG` I need it to look like this: `http://test.example.net/downloads/HPIM0276%20Alll%20Day%20Long.JPG` – Jake S Dec 13 '11 at 20:21

1 Answers1

1

Why not just use str_replace()?

$begone_index = str_replace("index.php/admin/","",$editThisURL);
CanSpice
  • 34,814
  • 10
  • 72
  • 86
  • Been attempting with str_replace, and in the case above `echo $begone_index;` gives me the same result as `echo $editThisURL;` – Jake S Dec 13 '11 at 20:28