Thread: PHP Problem
View Single Post
Old 12-01-2010, 02:31:25 PM     #19 (permalink)
Betty Boop
Junior Member
 
Join Date: Jan 2010
Posts: 14
Betty Boop is on a distinguished road

More problems!

Hi,

I have been trying to do this for ages now....here is the code I have got.

$obj = json_decode($url);

printf('%s (%d) %s %s %s', $obj->title, $obj->year, $obj->country, $obj->genres, $obj->rating);
printf('<a href="%s"> %s'</a>, $obj->imdburl);

I want to display the first printf without linking to the url, I want this information to be displayed in a table with html or php. With the 2nd printf I want a link called 'More Info' to take the user to the imdb page on the film that is searched.

Originally I had:

printf('<a href="%s" title="%s">%s (%d)</a>', $obj->imdburl, $obj->title, $obj->title, $obj->year);

This made the whole content hperlinked and when pressed it took the user to the imdb site with info about the film searched.

I probably haven't described it clearly but if anyone knows how to do this it would help a lot.

Thanks.
Betty Boop is offline