Thanks for the replies,
Ottogal yep just a typo there, i've amend post and yeah I'm using Evo.
Susan, yep tried cached and uncached but still no luck.
I've stripped the snippet down to the basics:
[[mysnippet? &url=`[~[*id*]~]` ]]
For this example the value of the url will be "en/home.html"
The snippet code is:
$pos = strpos($url, 'en');
$output = $pos;
return $output;
This should return 0, but it's returning nothing at all.
If I manually set &url in the snippet call it works fine. Also if I output $url in the snippet the correct url is returned. But I think all that is happening here is it's actually just outputting "[~[*id*]~]" again which is then getting processed outside of the snippet.
Thanks again
Ben