Jump to content

echo syntax problem. please help.


loshyt

Recommended Posts

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 :P

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.