05.05.2013 Views

Programming PHP

Programming PHP

Programming PHP

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

strtr<br />

string strtr(string string, string from, string to)<br />

Returns a string created by translating in string every occurrence of a character in from to<br />

the character in to with the same position.<br />

strval<br />

string strval(mixed value)<br />

Returns the string equivalent for value. Ifvalue is a nonscalar value (object or array), the<br />

function returns an empty string.<br />

substr<br />

string substr(string string, int offset[, int length])<br />

Returns the substring of string. Ifoffset is positive, the substring starts at that character; if<br />

it is negative, the substring starts at the character offset characters from the string’s end. If<br />

length is given and is positive, that many characters from the start of the substring are<br />

returned. If length is given and is negative, the substring ends length characters from the<br />

end of string. Iflength is not given, the substring contains all characters to the end of<br />

string.<br />

substr_count<br />

int substr_count(string string, string search)<br />

Returns the number of times search appears in string.<br />

substr_replace<br />

string substr_replace(string string, string replace, string offset[, int length])<br />

Replaces a substring in string with replace. The substring replaced is selected using the<br />

same rules as those of substr( ).<br />

symlink<br />

int symlink(string path, string new)<br />

Creates a symbolic link to path at the path new. Returns true if the link was successfully<br />

created and false if not.<br />

450 | Appendix A: Function Reference<br />

This is the Title of the Book, eMatter Edition<br />

Copyright © 2002 O’Reilly & Associates, Inc. All rights reserved.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!