mofle Posted April 5, 2008 Share Posted April 5, 2008 I use Yahoo Pipes to get some content using the a serialized PHP: $request = "http://pipes.yahoo.com/pipes/pipe.run?_id=DsfnOGlK3BGw4DuRJZhxuA&_render=php&search=alias"; $response = file_get_contents($request); if ($response === false) { die('Request failed'); } $phpobj = unserialize($response); I have a variable ($search) with the results from a form. And the url should be something like this: http://pipes.yahoo.com/pipes/pipe.run?_id=DsfnOGlK3BGw4DuRJZhxuA&_render=php&search=$search The array I get from Pipes is a Multidimensional Array, like this: http://pastebin.com/m2a6649b4 What i need is a loop for the "title" and the "link". With the "link" as a href to the the title. And I need to change the link from: http://www.mininova.org/get/1290875 to http://" . $_SESSION["user"] . $_SESSION["pass"] . $_SESSION['host'] . "/gui/?action=get-url&s=" . urlencode(http://www.mininova.org/get/1290875) For example: http://username:[email protected]:9999/gui/?action=get-url&s=http%3A%2F%2Fwww.mininova.org%2Fget%2F1290875 I really hope someone can help me with this one Link to comment https://forums.phpfreaks.com/topic/99729-multidimensional-array/ Share on other sites More sharing options...
Barand Posted April 5, 2008 Share Posted April 5, 2008 <?php foreach ($array['values']['items'] as $data) { $link = $data['link']; $title = $data['title']; // process link and title } Link to comment https://forums.phpfreaks.com/topic/99729-multidimensional-array/#findComment-510136 Share on other sites More sharing options...
mofle Posted April 5, 2008 Author Share Posted April 5, 2008 Thank you so much. What should i do next? // process link and title I'm sorry to say it, but i'm kind of a newbie at this. Link to comment https://forums.phpfreaks.com/topic/99729-multidimensional-array/#findComment-510175 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.