preg_match_all problem

Durch die Forensuche bin ich auf folgenden Code gestoßen:

PHP:
preg_match('!$start(.*)$end!si', $include_daten, $matches); 
 $code = $matches[1];

Den hab ich dann für mich abgeändert und sieht bei mir jetzt so aus:

PHP:
$start = '<td class="celllite" align="center">';
$end = '</td>';
preg_match_all('!$start(.*)$end!si', $str, $ergebnisse);
 print_r($ergebnisse);

Der String $str enthält folgenden Inhalt:

PHP:
<html>
<body>
<table width="100%" cellpadding="1" cellspacing="0" border="0">
<tr>
<td class="CellTitle" align="center">Name</td>
<td class="CellTitle" align="center">Category / Lang*</td>
<td class="CellTitle" align="center">Color</td>
<td class="CellTitle" align="center">Rarity</td>
<td class="CellTitle" align="center">Cond</td>
<td class="CellTitle" align="center">Stock</td>
<td class="CellTitle" align="center" nowrap>Price</td>
<td class="CellTitle" align="center">Qty</td>
</tr>
<tr>
<td class="celllite">&nbsp;<a href="javascript:;" onclick="ShowPic('card', 10112);">Oxidize</a> </td>
<td class="celllite" align="center">Darksteel Foil</td>
<td class="celllite" align="center"><font color="#006600">G</font></td>
<td class="celllite" align="center">U</td>
<td class="celllite" align="center">Mint</td>
<td class="celllite" align="center">0</td>
<td class="celllite" align="center">3,75 €</td>
<td class="celllite" align="center"><input type="button" value="Anforderung" class="ButtonNormal_small" onfocus="this.blur()" onClick="RequestItem('c','10112');"></td>
</tr>
<tr>
<td class="celldark">&nbsp;<a href="javascript:;" onclick="ShowPic('card', 9947)">Oxidize</a> </td>
<td class="celldark" align="center">Darksteel</td>
<td class="celldark" align="center"><font color="#006600">G</font></td>
<td class="celldark" align="center">U</td>
<td class="celldark" align="center">Mint</td>
<td class="celldark" align="center">12</td>
<td class="celldark" align="center">1,25 €</td>
<td class="celldark" align="center"><input type="text" size="1" maxlength="5" name="qty9947" value="1"> <input type="button" value="Buy" class="ButtonNormal" onclick="Add('c', 9947, this.form.qty9947.value)"></td>
</tr>
<tr>
<td class="CellTitle" colspan="8" height="5"><img src="images/spacer.gif" width="1" height="1"></td>
</tr>
</table>
</body>
</html>

Wenn ich das Skript nun ausführe, kommt aber nur folgendes dabei raus:

Array ( [0] => Array ( ) [1] => Array ( ) )

An was könnte das liegen?

MagicMasterII
 
Nehme im Ausdruck doppelte statt einfacher Anführungszeichen....sonst werden die Variablen dort nicht geparst:
Code:
preg_match_all("!$start(.*)$end!si", $str, $ergebnisse);
 
Zurück