|
Posted by Justin Koivisto on 01/25/06 19:14
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)
Is the stop parameter the length, or the last character's position? That
may make a bit of difference...
For instance (I'm about to attempt this, so please forgive me...):
<%
dim MyStr as String, NewStr as String
MyStr = "This is my string"
NewStr = Mid(MyStr,3,7)
%>
if NewStr ends up to be "s is my" then that is equivalent. (I'm not sure
on this as I don't use asp)
> 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---
what does InStr do? maybe something like strstr ?
--
Justin Koivisto, ZCE - justin@koivi.com
http://koivi.com
[Back to original message]
|