Danke für den tip mit dem typecast Ashura, hat prima geklappt!
Falls es noch wen interessiert, ich hab das problem folgendermaßen gelöst:
$int_wert = $inhalt[0]; //Aus der $inhalt[0] kommt die zahl
$str_wert = (string) $int_wert;
$length=strlen($str_wert);
for ($start=0; $start<=$length; $start++) {
if ( $str_wert{$start} == 0) {
$gesammt[$start]="<img src='images/0.gif'>";}
if ( $str_wert{$start} == 1) {
$gesammt[$start]="<img src='images/1.gif'>";}
if ( $str_wert{$start} == 2) {
$gesammt[$start]="<img src='images/2.gif'>";}
if ( $str_wert{$start} == 3) {
$gesammt[$start]="<img src='images/3.gif'>";}
if ( $str_wert{$start} == 4) {
$gesammt[$start]="<img src='images/4.gif'>";}
if ( $str_wert{$start} == 5) {
$gesammt[$start]="<img src='images/5.gif'>";}
if ( $str_wert{$start} == 6) {
$gesammt[$start]="<img src='images/6.gif'>";}
if ( $str_wert{$start} == 7) {
$gesammt[$start]="<img src='images/7.gif'>";}
if ( $str_wert{$start} == 8) {
$gesammt[$start]="<img src='images/8.gif'>";}
if ( $str_wert{$start} == 9) {
$gesammt[$start]="<img src='images/9.gif'>";}
}
echo " <table cellpadding='0'cellspacing='0'border='0'align='center'><tr> ";
for ($start=0; $start<=($length-1); $start++) {
echo "<td>$gesammt[$start]</td>";
}
echo "</tr></table>";
Nun kann ich auch schlafen gehen ;)