Simple problem

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
pinehead18
Forum Contributor
Posts: 329
Joined: Thu Jul 31, 2003 9:20 pm

Simple problem

Post by pinehead18 »

My script is laid out like this.

Code: Select all

$output .=" stuff stfuf stuff".
        $result = mysql_query("SELECT user,mainpic,city FROM users WHERE mainpic <> 'default.gif' ORDER BY rand()");
        $row = mysql_fetch_array($result);
        
                $mainpic = $row['mainpic'];
                $uname = $row['user'];
                $location = $row['city'];."
                   more stuff";
yet i get a '.' error. Any ideas?

thank you
anthony
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Re: Simple problem

Post by timvw »

get yourself a decent php editor

$output .=" stuff stfuf stuff";
$location = $row['city'];
magicrobotmonkey
Forum Regular
Posts: 888
Joined: Sun Mar 21, 2004 1:09 pm
Location: Cambridge, MA

Post by magicrobotmonkey »

i think what you want is

Code: Select all

$location = $row&#1111;'city']."more stuff"; 

//not

 $location = $row&#1111;'city'];."more stuff";
Post Reply