php isn't displaying mysql query correctly
| From: | Adam Williams | Date: | Fri, 17 Apr 2009 15:41:56 +0000 |
| Subject: | php isn't displaying mysql query correctly | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-291629@lists.php.net to get a copy of this message | ||
I have the code:
$mysqli_get_support_types = "Select types from support_types order by types";
$mysqli_get_support_types_result = mysqli_query($mysqli,$mysqli_get_support_types) or die(mysqli_error($mysqli));
while (mysqli_fetch_array($mysqli_get_support_types_result))
{
echo "<option>".$mysqli_get_support_types[types];
}
echo "</select>
but when I go to the web page source it displays:
<select><option>S<option>S<option>S<option>S<option>S<option>S<option>S<option>S<option>S<option>S</select>
but the query runs correctly in MySQL. So why is php just printing S's?
mysql> Select types from support_types order by types;
+---------------------+
| types |+---------------------+
| Change User || Computer Hardware | | Computer Peripheral | | Computer Software |
| Delete User | | Networking | | New Project | | New User | | Server | | Telephone |+---------------------+ 10 rows in set (0.00 sec)