notice the change in $pattern
$subject = '<table width="750" style="padding-left:150px;"><tr><td width="108"class="fieldname">First Name:</td><td width="381" class="fieldname">';
$pattern = '/(table)/';
$matches = array();
echo preg_match( $pattern, $subject, $matches)."<br/>";
echo $matches[0]."<br/>";
gives me output
1
table
AND prefixing table by < in $pattern gives me output
1
WHY ?? shouldn’t i get < table as ouput ?
You get it, but you don’t see it(it’s HTML-markup and the browser tries to render a table).
Use
…to inspect the matches.