How would i go about selecting say the first 50 characters in a string variable. I have tried (without luck) ereg("(.{0,50}).,$string,$arr). and using $arr[1]. any help? thanks.
I guess you mean $arr[0] instead of $arr[1]. A better way should be this:
function GetNChars($n, $str) { $str = substr($str, 0, $n); return $str; }
Greetz,
Vincent Driessen Venlo, The Netherlands