Re: Cut text from a string

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> I meant i want to get rid of the braces. e.g. get the text up to the start
> of the first brace and ignore anything from the first brace onwards

I don't see any braces, either. For the record:

brace = {}
bracket = []
parentheses = ()
comma = ,
semicolon = ;

To extract the partial string leading to the first parentheses:

$var="this is how  we do (50 cents feat. the game)";

$stringpart = substr($var,0,strpos($var,"("));
-- 
Crash

Please reply to the group. E-mail is blocked.

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux