Reply to Re: rightmost characters

Your name:

Reply:


Posted by Shelly on 09/26/39 11:40

"Jim Carlock" <anonymous@127.0.0.1> wrote in message
news:IR8Kf.32687$Fw6.15304@tornado.tampabay.rr.com...
> Does PHP provide a function to extract the rightmost characters
> from a string?
>
> For example, the VB/ASP equivalent...
>
> sStateAbbr = Right$(sCityState, 2)
>
> Thanks.
>
> Jim Carlock
> Post replies to the group.
>
>

I think there is a function, but offhand can't recall it and a quick search
of www.php.net didn't reveal it quickly. However, there is always:

$sStateAbbr = substr($sCityState, strlen($sCityState) - 2);

Remember that PHP variables start with a dollar sign.

Shelly

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация