[BNM] PHPFlickr / PHP - array

Dave Child dave at ilovejackdaniels.com
Tue Aug 8 15:29:30 BST 2006


print_r output needs to be wrapped (or formatted) to display properly. Try  
this:

echo '<pre>';
print_r($array);
echo '</pre>';

That'll display it in a more readable form.



On Tue, 08 Aug 2006 15:18:38 +0100, delarge <delargerock at gmail.com> wrote:

> I know Giselle from cielo.net is on holiday, but I was wondering if  
> anyone
> here has tried out phpflickr (phpflickr.com)
>
> Now I am a complete beginner with API stuff - but I have had moderate
> success with this, largely because it's based in PHP :)
>
> Anyhow - my question comes when I try to get my Sets list... or rather -
> how, in PHP, do I handle an array like this?
>
> Array ( [_name] => photosets [_attributes] => Array ( ) [_value] =>
> [photoset] => Array ( [0] => Array ( [_name] => photoset [_attributes] =>
> Array ( [id] => 72157594210674535 [primary] => 187192323 [secret] =>
> 160034432e629d6f [server] => 55 [photos] => 17 ) [_value] => [id] =>
> 72157594210674535 [primary] => 187192323 [secret] => 160e644329d6f  
> [server]
> => 55 [photos] => 17 [title] => Kensington Street Graf [description] =>
> Brighton, UK ) [1] => Array ( [_name] => photoset [_attributes] => Array  
> (
> [id] => 72157594196908180 [primary] => 185096085 [secret] =>  
> 10b496670d7bc2
> [server] => 59 [photos] => 11 ) [_value] => [id] => 72157594196908180
> [primary] => 185096085 [secret] => 10b44456779d7bc2 [server] => 59  
> [photos]
> => 11 [title] => Graf Jam B/W [description] => The black & white series )
> [2] => Array ( [_name] => photoset [_attributes] => Array ( [id] =>
> 72157594228368247 [primary] => 209548502 [secret] => ac653366789896  
> [server]
> => 66 [photos] => 4 ) [_value] => [id] => 72157594228368247 [primary] =>
> 209548502 [secret] => ac65343121239896 [server] => 66 [photos] =>  
> 4........
> etc etc
>
> This is the result I get back when I print_r - I am baffled as to how to  
> get
> this to echo/print on my page - it doesn't seem like your average  
> array...
> can anyone help me out? This is my final frontier befreo I have Flickr
> working with my site exactly how I want it and I have come to dead  
> end....
>
> Thanks a lot
>
>



-- 
www.ilovejackdaniels.com - Web Marketing and Development



More information about the BNMList mailing list
BNMList is hosted by Screenlists, a Screen-Play.net service