Jump to content

how to parse an array into variables


dflow

Recommended Posts

hi im trying to extract the results fetched in this while loop as $var1,$var2 etc until the end of the rows fetched by this query:

<?php

$query="SELECT * FROM Suppliers WHERE CITY='Berlin'";

$result = mysql_query($query) or die(mysql_error());

 

 

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

echo $row['website_url'];

echo "<br />";

}

?>

 

i would like to continue this as :

$var1=$GET_ROW#1;

$var2=$GET_ROW#2;

$var3=$GET_ROW#3;

 

and so on until the  of the query

 

and then use the variables created in a new loop

 

i hope i am clear

thx

 

Link to comment
https://forums.phpfreaks.com/topic/124193-how-to-parse-an-array-into-variables/
Share on other sites

now that i defined my fields how would you guys suggest, i loop through the results:

and one of my fields is a XML URI

what i want to achieve is to load the  XML URI from each row loop through them and eventually parse some realtime data.

 

how would you approach  that?

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.