I've got a really annoying PHP problem.
On my home server, the following code works:
The value of $routedesc outputs 3 times, eg. "abcdefg..." "dfsfsdfdsff..." dsfsddf..."
However, when I upload this to another server, I get this output:
"a" "." "."
If I then print the session, I get this:
[routedesc] => ....
Any ideas on what appears to be destroying the session?
On my home server, the following code works:
Code:
while ($cur_row=mysql_fetch_assoc($result)) {
$_SESSION["hikes"][]=$cur_row["hikeid"];
$_SESSION["routedesc"][]=$cur_row["routedesc"];
}
//print_r($_SESSION);
for ($a=0; $a<count($_SESSION["hikes"]); $a++) {
$routedesc = substr($_SESSION["routedesc"][$a],0,11)."...";
}
However, when I upload this to another server, I get this output:
"a" "." "."
If I then print the session, I get this:
[routedesc] => ....
Any ideas on what appears to be destroying the session?