Re: print_r($row);

From: Date: Tue, 04 Feb 2003 13:10:00 +0000
Subject: Re: print_r($row);
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-25409@lists.php.net to get a copy of this message
> i do print_r($row); and all my data is printing properly from > my db. however, with the below code only one row is not printing: > {$row->property_type} > thank you for your time. addison > > <? > // Begin Ad Block > $count = 0; > $id = 45; > $obj = mysql_db_query($dbname,"select a.*,s.name as > subcategory_name,c.name as category_name from ads a,subcategory s, > category c where a.subcategory=s.id and s.category=c.id and > a.subcategory=$id and a.que='checked'"); > if ($obj && mysql_num_rows($obj)>0) { > while($row = mysql_fetch_object($obj)) > { > $count++; > ?> > <? echo "{$row->bedrooms}Bedroom/{$row->baths}Bath > {$row->property_type}<br> > {$row->description}<br> > {$row->distance} from campus.<br> > Available: {$row->date_available}<br> > {$row->price}<br> > Contact: {$row->contact}"; > ?> > </font><font color="#000000" size="2" face="Arial, > Helvetica, sans-serif"><br /> > <br> > <img src="../images/thin_line.gif" width="185" > height="1"><br> > <br> > <? > } > } > // End Ad Block > ?> > > this is what is printing: > > 2Bedroom/2Bath great place less than 5 miles From Campus Available > immediately $500.00/month > Contact: 321-1791 What does the print_r() actually look like? Make sure the cases match, $row->Test is not the same as $row->TEST. ---John Holmes...

« previous php.db (#25409) next »