Hi friends How to retreive the picture from an array, In my program $fields = array("picture"); $userid=100 if I pass these two in my method To get the picture If i print the array value means it is giving me only the link http://profile.ak.facebook.com/profile5/45/35/s731487500_7.jpg not the picture so i need of the picture that i have uploaded, not the link IN order to get the picture what i want to do any body knows the code for this in PHP
instead of printing just the array value... echo array("picture"); PHP: you need to echo out the img tags.... echo '<img src="'.array("picture").'">'; PHP:
Ummm... you cannot echo arrays like that. It should be: $fields = array("picture"); echo '<img src="'. $fields[0] .'">'; PHP: But if you'd rather output the image without <img> tags, you can do: $fields = array("picture"); header('Content-Type: image/jpeg'); readfile($fields[0]); // Path to image exit(); PHP: