RizbIT
Member
got a php script on server, using http post in game maker to return a string from the script to the game.
it works in basic form where in the php i just put
echo "hello";
the game shows message "hello" as you would expect.
now im getting some id (int) values from a mysql db and making a string with ids seperated by commas for example "1,2,3,5,7,8,9"
i use this:
But it doesnt return anything!
now if i change it to
echo "Wtf".$rett;
it returns "Wtf1,2,3,5,7"
so why is this weird problem? Why wont it return "1,2,3,5,7"?
Ive also tried
echo strval($rett);
deosnt work either...
it works in basic form where in the php i just put
echo "hello";
the game shows message "hello" as you would expect.
now im getting some id (int) values from a mysql db and making a string with ids seperated by commas for example "1,2,3,5,7,8,9"
i use this:
Code:
$rett="";
if ($result)
{
if (mysqli_num_rows($result)>0)
{
while ($row = mysqli_fetch_assoc($result))
{
$rett = $rett . strval($row["id"]) . ",";
}
}
}
echo $rett;
now if i change it to
echo "Wtf".$rett;
it returns "Wtf1,2,3,5,7"
so why is this weird problem? Why wont it return "1,2,3,5,7"?
Ive also tried
echo strval($rett);
deosnt work either...