YoN
10-30-2003, 03:42 PM
Hi,
Does anyone know why substr would return just the first character of a string in the code below?
$lang = substr($_GET["lang"], 0, 2);
f.i. if $_GET["lang"] is english the code sets $lang to e.
it's supposed to set $lang to the two first characters, isn't it?:confused:... at localhost (PHP 4.3.3) it works just fine but at the server (PHP 4.3.2) it doesn't.
Thanks in advance.
Does anyone know why substr would return just the first character of a string in the code below?
$lang = substr($_GET["lang"], 0, 2);
f.i. if $_GET["lang"] is english the code sets $lang to e.
it's supposed to set $lang to the two first characters, isn't it?:confused:... at localhost (PHP 4.3.3) it works just fine but at the server (PHP 4.3.2) it doesn't.
Thanks in advance.