You are here: Re: ASP2PHP Function List Reference « PHP Programming Language « IT news, forums, messages
Re: ASP2PHP Function List Reference

Posted by David Haynes on 01/25/06 20:27

T.Taylor wrote:
> I am new to PHP so I thought I would make a Reference List of some of
> the functions.
> Below is what I have so far.
>
>
>
> ASP Functions PHP Functions
> ==================== ===============
> Left(str,length) substr(str,start,length)
> Right(str,length) substr(str,start,length)
> Mid(str,start,stop) substr(str,start,length)
> Len(str) strlen(str)
> Trim(str) trim(str)
> LTrim(str) ltrim(str)
> RTrim(str) rtrim(str)
> UCase(str) strtoupper(str)
> LCase(str) strtolower(str)
> InStr(str,value) ---DON'T KNOW---
>
It might be clearer as follows:

Left(str, length) <=> substr(str, 0, length)
Right(str, length) <=> substr(str, strlen(str)-length)
Mid(str, start, stop) <=> substr(str, start, (stop-start+1))

You could always create a function to match the ASP one:

function Left($str, $length) {
return substr($str, 0, $length);
}

and so on...

-david-

 

Navigation:

[Reply to this 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

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