On Wed, Jun 27, 2012 at 5:15 PM, Kirk Bailey <kbai...@howlermonkey.net> 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?

As said, PHP is not Python. Pretty much *nothing* else is Python.

That said, the trope still has legs in PHP:

>From <http://us2.php.net/manual/en/function.substr.php> :

   "If start is negative, the returned string will start at the
   start'th character from the end of string."

> 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 with no hint of where to look is a problem. But the dictum of
"Read here in the manual" will surely be the best thing. You will then
know where to look for future questions.

> Would anyone care to help me understand this without dedicating 4 precious
> and in over demand/under supply hours to RTFM?

You may not have 4 precious and overdemanded/undersupplied hours, but
at some point everyone who can answer this has had to slog through the
manual; we haven't just been lounging in our opulence pouring over the
documentation out of some need to aleviate our boredom. Nor is anyone
on this list to spend their time providing answers which *are* readily
available with just a bit of google-fu.

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

Reply via email to