I am using this code to get the variable iduser to use it in php as part of another url ( line2). But it gives me the following error "Parse error: syntax error, unexpected T_VARIABLE in" can you please show me my mistake.
<?php
$iduser=$_GET['iduser'];
$currsiteurl = 'http://graph.facebook.com/'$iduser;
<?php
$iduser = $_GET['iduser'];
$currsiteurl = "http://graph.facebook.com/${iduser}";
?>
should work hope this helps.
You have a syntax error.
$currsiteurl = 'http://graph.facebook.com/' . $iduser;
you forgot the concatination .
between string and variable:
$currsiteurl = 'http://graph.facebook.com/' . $iduser;
should work
Use this code
<?php
$iduser=$_GET['iduser'];
$currsiteurl = 'http://graph.facebook.com/'.$iduser;
?>
You have to use '.' to join string in php