title: Finding strrpos of \ in a String
body: <p>Here's a puzzler. I have a variable that contains computer file paths. I need to separate the filename from the path.</p>
  
  <p>Example:
   From this:</p>
  
  <pre><code>$filepath = C:\\User\Me\Myfiles\file.jpg
  </code></pre>
  
  <p>I need this:</p>
  
  <pre><code>$path = C:\\User\Me\Myfiles\
  $file = file.jpg
  </code></pre>
  
  <p>I know how to get the substrings of $filepath using substr. The problem is using "\" as a "needle" to get the position of the filename.</p>
  
  <p>This causes an error:</p>
  
  <pre><code>$pos = strrpos("\",$filepath);
  </code></pre>
  
  <p>This doesn't cause an error, but doesn't give me a value for $pos:</p>
  
  <pre><code>$pos = strrpos("\\",$filepath);
  </code></pre>
  
  <p>As always, any help with be rewared with my eternal gratitude.</p>