Wordpress code highlighter plug-in
Posted by simon at October 30th, 2007
Initially I tried to install Dean's code highlighter from the Wordpress plug-in directory but I couldn't get it to work and it didn't seem to highlight my code at all. So instead I installed the other code highlighter that was available. It seemed to work without any problems until I noticed that it was adding a random bit of PHP code </odbc_num_fields($result);++$i)>.
So after installing both available plug-ins I decided a little CSS class just to indent my code and make it stand out from the other text.
function odbc_fetch_array($result)
{
if (odbc_fetch_row($result)){
for ($i=0;$i<odbc_num_fields($result);++$i){
$rs[$i+1]=odbc_result($result,$i+1);
$rs[odbc_field_name($result,$i+1)]=odbc_result($result,$i+1);
}
return $rs;
}
return false;
}

