Hi,
the problem is that I am trying to use a varible in the objects
attribute name. the offending line of code is:
echo "<img src='$row->cPic$count' border='1'>";
this is giving the warning:
Undefined property: cPic
I have tried playing with eval and variable variables to
get 'cPic$count' to look like 'cPic1' before trying to
use it, but nothing is working. There has to be a way
to do this. Any help is greatly appreciated.
-Craig
while ($row = mysql_fetch_object($result)) {
//other code...
$count = 1;
while ($count <= $row->tiPicCount) {
echo "<img src='$row->cPic$count' border='1'>";
++$count;
}
//other code...
}
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php