Record Results into an array into 1 variable

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ianhull
Forum Contributor
Posts: 310
Joined: Tue Jun 14, 2005 10:04 am
Location: Hull England UK

Record Results into an array into 1 variable

Post by ianhull »

Hi Guys,

How would I get the results of this array into 1 variable which I could use.

Code: Select all

while($line = mysql_fetch_array($result)) 
{
extract($line);
}
Thanks in advance
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

$line is a single variable.
ianhull
Forum Contributor
Posts: 310
Joined: Tue Jun 14, 2005 10:04 am
Location: Hull England UK

Post by ianhull »

feyd,

how would I get each row to write to a text file

I would like to write .css information to a text file based on the results

Code: Select all

while($line = mysql_fetch_array($result)) 
{ 
extract($line); 

//write this to a .css file for each record in the table

#Property_'.$id.' {
	position:absolute;
	width:483px;
	height:120px;
	z-index:1;
	left: 256px;
	top: '.$plus.'2px;
	background-attachment: scroll;
	background-image: url(/pictures/'.$picture.');
	background-repeat: no-repeat;
	background-position: left top;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-style: normal;
	line-height: normal;
	font-weight: normal;
	font-variant: normal;
	text-transform: none;
	color: #666666;
	text-decoration: none;
	text-align: left;
	vertical-align: top;
    margin-left: 120px;
	padding-left: 120px;
}
}
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Post Reply