PHP weird problem //useless string to get to 20?

Evan Kkos

New member
Why would this code:
$stasi=$_GET['stasi'];
$oDijk = new Dijkstra();
if($stasi=='a')echo "hurray";
$oDijk->start('a',$aRoutes);//start point a
Work just fine and this one
$stasi=$_GET['stasi'];
$oDijk = new Dijkstra();
$oDijk->start($stasi,$aRoutes);//start point a
gets stuck in a damned infinite loop?
please help i need a new perspective on this one.
the point is i only change

$oDijk->start('a',$aRoutes);

with $oDijk->start($stasi,$aRoutes);

which is a string variable with the value 'a'
so it should work!
@Julijan Good idea but no. I tried it. The only part of the code i use that variable is the one i posted. I am just trying to read the start node for a dijkstra algorythm from the keyboard, is that so much to ask for.
 
Back
Top