The warning suggest you are running somethin earlier than php 4.1. I checked the manual and the second param was added in 4.1
More disturbingly, I tested it on my system and the function din't actually strip the | at the end of the line.
If you are stuck with this problem I guess you could do something inelegant like;
check the final char with:
$char = substr($MySrray, -1) //gets the end char
then check it
if ($char == '|') {
$stripped_string = substr($MyString, 0, -1);
}
that's ugly but should work - the final piece comes straight from the manual under substr.
rinjani