I just have question about which way of coding this is better or right?
have seen both ways done but I have no idea witch is better.
Code: Select all
$sql = "select * from lqlotl.inventory where lqlotl.inventory.charid='$charid' AND lqlotl.inventory.itemid='$itemid' AND lqlotl.inventory.randid='$randid'";
$iteminfo = mysql_query($sql) or die("Could not item info get item");
$iteminfo2 = mysql_fetch_array($iteminfo);
Code: Select all
print "<strong>ITEM INFO</strong><br />
Name: " . $iteminfo2['name'] . "<br />
Type :" . $iteminfo2['type'] . "<br />
SubType :" . $iteminfo2['subtype'] . "<br />
Stack size :" . $iteminfo2['stack'] . "<br />
Quantity :" . $iteminfo2['quantity'] . "<br />
Weight :" . $iteminfo2['weight'] . "<br />";
Code: Select all
$name = $iteminfo2['name'];
$stack = $iteminfo2['stack'];
$quantity = $iteminfo2['quantity'];
$type = $iteminfo2['type'];
print "<strong>ITEM INFO</strong><br />
Stack: " . $stack . "<br />
Type :" . $type . "<br />
Quantity :" . $quantity . "<br />