Assuming that it will always be in this format (/something/what you
want/...), explode() the string by '/' into an array, and get the right
element back.

<?
$a = /realtor/Remax/Ed/files/
$aa = explode('/', $a);
echo $aa[2];
?>

Enjoy

Justin French



on 28/09/02 1:23 AM, [EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote:

> 
> I've got a situation where I need to pull a string from a variable but I
> can't seem to get it figured out.
> 
> I.e.
> 
> value of $a = /realtor/Remax/Ed/files/
> 
> I need to get the string between the second and third / (slash)
> 
> What I need: Remax
> 
> Thanks,
> 
> Ed
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to