Re: How do I chop off the beginning of a string?

From: Date: Wed, 12 Jul 2000 16:28:20 +0000
Subject: Re: How do I chop off the beginning of a string?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-6179@lists.php.net to get a copy of this message
I found it interesting that on 7/12/00 12:08 PM Jason Bryner said: > I have the following strings being read in from a text file, one at a time. > How can I get rid of the beginning quotes and number? So it would end up > like so: > > => array("date"=>...... > > The strings are as so (the content changes, but still stays the same > format): > > "0" => array("date"=>"7/11/2000", > "author"=>"Jason Bryner", "next"=>"add") > ,"2" => array("date"=>"7/12/2000", > "author"=>"Me", "next"=>"add") > > This is what I tried: > $string = strstr($string, "\""); //Yep, it's supposed to be there twice > $string = strstr($string, "\""); > > Again, any help and suggestions would be appreciated. $string = substr($string,strpos($string," =>"),strlen($string)); This is if you want to keep the space in front of the equals sign, otherwise you do $string = substr($string,strpos($string,"=>"),strlen($string)); This is assuming the string is always: ~something~ => array(......) -- Thomas Deliduka IT Manager ------------------------- New Eve Media The Solution To Your Internet Angst http://www.neweve.com/

« previous php.general (#6179) next »