i want to access a certain node of my xml with given id which i’m getting from a post parameter like this:
$id = $_POST['id'];
$xml->content[$id];
unfortunately it doesn’t work – returns empty. seems like because $id is problably of type string, not integer.
i tried to convert it like:
$id = int $id;
which gave me this error:
syntax error, unexpected T_VARIABLE
any ideas how to fix it?
thanks
You should use
instead of $id = int $id;