grab text between ""

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
pedroz
Forum Commoner
Posts: 99
Joined: Thu Nov 03, 2005 6:21 am

grab text between ""

Post by pedroz »

$string = 'var togo = "gowentgone"';

how can i grab the text with preg_match_all?
preg_match_all('/"(.*)"/i', $string, $result) ;
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Re: grab text between ""

Post by superdezign »

Are you asking about the format of the return value? The manual can answer that question for you.
Post Reply