loshyt Posted February 7, 2011 Share Posted February 7, 2011 ok im building facebook app and im just back to php after months not touched it. this is the code: $image = $facebook->api_client->photos_get(null,null, echo $uid); print_r ($image); echo "<BR>"; echo $image[0]["src"]; the problem is that echo $uid i tried every variation and it does not work! i maybe forget something that i should have done? the $uid containing user id numbers so what i did wrong and if im not wrong i wanted the numbers($uid) Wrapped in quotation marks so i tried: echo ." $uid ". and alot of other plz help tnx Quote Link to comment https://forums.phpfreaks.com/topic/226993-echo-syntax-problem-please-help/ Share on other sites More sharing options...
KevinM1 Posted February 7, 2011 Share Posted February 7, 2011 You can't echo in a function argument list. Echo literally means "echo this to the screen", so you can see how that won't make sense. If you need quotes around the variable, simply do: $uid = '"' . $uid . '"'; (that's a single quote, followed by a double quote, followed by another single quote) That said, are you sure you need the value of $uid to be wrapped in quotes? Quote Link to comment https://forums.phpfreaks.com/topic/226993-echo-syntax-problem-please-help/#findComment-1171144 Share on other sites More sharing options...
loshyt Posted February 7, 2011 Author Share Posted February 7, 2011 You can't echo in a function argument list. Echo literally means "echo this to the screen", so you can see how that won't make sense. If you need quotes around the variable, simply do: $uid = '"' . $uid . '"'; (that's a single quote, followed by a double quote, followed by another single quote) That said, are you sure you need the value of $uid to be wrapped in quotes? tnx silly me! Quote Link to comment https://forums.phpfreaks.com/topic/226993-echo-syntax-problem-please-help/#findComment-1171153 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.