Hi all

Im quite new to PHP and Im having a bit of trouble with limiting 'chuncks' of text within a table listing.

The code lists properties from a database and works perfectly until I want to only choose the first 2 characters of a particular field. the code reads as follows.

while ($properties = mysql_fetch_array($props)) {
  echo "<tr valign='top'>\n";
  $id = $properties['id'];
  $keycode = $properties['StreetName'];
  $housecode = $properties['LEFT(StreetName,2)'];
  $number = $properties['HouseNr'];
  $proptext = htmlspecialchars($properties['StreetName']);
  echo "<td>$id</td>\n";
  echo "<td>$number $proptext</td>\n";
  echo "<td>$housecode</td>\n";
  echo "</tr>\n";
When the page executes I get a blank column. Im sure its just the syntax, but I have tried it all ways putting the ' and the ( charcters in different places.

The line that will not execute is this one - $housecode = $properties['LEFT(StreetName,2)'];

Im sure one of you clever people can tell how much of a muppet im being!