Re: slicing and dicing strings
| From: | Stuart Dallas | Date: | Wed, 27 Jun 2012 23:29:27 +0000 |
| Subject: | Re: slicing and dicing strings | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-318312@lists.php.net to get a copy of this message | ||
WARNING: May contain traces of sarcasm.
On 27 Jun 2012, at 23:15, Kirk Bailey wrote:
> ok, it slices and dices, but how?
> in python, to print all but the last char in string FOO, we say
> print FOO[:-1]
> But this seems to bark like a basset hound in php. Whyfore?
Because it's not valid syntax in PHP.
> Now tihs tyro is seeking sage words to help me understand this.
> RTFM is not sage words; if you don't want to help me please don't waste the
> bandwidth.
RTFM is the best response to such a simple request. Seriously, how hard is it to do this: http://bit.ly/MUDL80? This list is here to help you solve problems,
not laziness.
> Would anyone care to help me understand this without dedicating 4 precious and in over
> demand/under supply hours to RTFM?
If it would really take you 4 hours to find this out via the manual or Google then I think it would
be 4 hours well spent: 3 hours 55 minutes learning how to use the manual / Google effectively, and 5
minutes to then get the answer you seek.
-Stuart
--
Stuart Dallas
3ft9 Ltd
http://3ft9.com/