>From what it looks like, R, this code: if (substr($text, -1) == ".") {$test = substr($text, 0, -1);}
checks to see if there is a period at the end of text. If there is, it simply assigns $test to be $text without the '.' . I'm rather new at this, so if someone has a counterclaim to what this might be, feel free to speak up. J. Wharton "R" <[EMAIL PROTECTED]> wrote in message 000701c2015c$fd2e1570$0a6da8c0@lgwezec83s94bn">news:000701c2015c$fd2e1570$0a6da8c0@lgwezec83s94bn... > Hi ppl, > Can you tell me what does this mean? > > if (substr($text, -1) == ".") > {$test = substr($text, 0, -1);} > > I know the if part searches the $text from the starting for the "." > I am just confused about what the second and third arguement does in the > substr. (Second line) > > I know that this is an easy question for you PHP guys out there, > and I know i will get an answer, > so I thank you all in advance. > > Cheers > -Ryan A. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php