Jump to content

MySQL Results Into Array


calebrown

Recommended Posts

Hey everyone,

I'm working with Magpie RSS, I have mutable feed urls in my MySQL database.  I'm looking to pull all the urls out, and simply put them into a array which will allow magpie to display all feeds on one page.

For example in needs to be something like this:

(
  [0] => http://rss.slashdot.org/Slashdot/slashdot
  [1] => http://www.digg.com/rss/containertechnology.xml
  [2] => http://rss.cnn.com/rss/cnn_topstories.rss
)

Thanks in advance!
Link to comment
https://forums.phpfreaks.com/topic/35977-mysql-results-into-array/
Share on other sites

The Answer:

$query= "SELECT * FROM `feeds`, `category` WHERE `user_id` = " . ($_SESSION['user_id']) . " AND feeds.cat_id = category.cat_id ORDER BY `feed_id` ASC";
$result = mysql_query($query) or die(mysql_error());

while($row = mysql_fetch_array($result)) {

  {
      $rss = fetch_rss( $row[2] );

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.