need some php syntax help with my delegate class...

So I have finally manage to wrap my head around a delegate class which allows me to have linkable URL's in one of my columns. it works great, except I cant seem to work out 2 problems. One the URL's need to open in a new window, and not effect the current window. The 2nd problem is a PHP syntax issue. I need to test for 2 conditions, and if either is found, then do not make the field a link. Here's my code:
In both functions, I test for strings beginning with "sc0" and if found, then just return the string with no link. I need to modify that so it check for 2 strings, "sc0" and "fj" I cant seem to get the php syntax correct. Does php support something like:
if (condition1 or condition2) then
do nifty stuff here...
endif
So if you guys can help me with the syntax changes, it would be really appreciated!!!!
thanks!
- Code: Select all
<?php
class tables_master {
function remote__renderCell( &$record ){
if (substr($record->strval('remote'),0,3) == "sc0") {
return $record->strval('remote');
} else {
return '<a href=http://'.$record->strval('remote').'>'.$record->strval('remote').'</a>';
}
}
function remote__htmlValue( &$record ){
if (substr($record->strval('remote'),0,3) == "sc0") {
return $record->strval('remote');
} else {
return '<a href=http://'.$record->strval('remote').'>'.$record->strval('remote').'</a>';
}
}
}
?>
In both functions, I test for strings beginning with "sc0" and if found, then just return the string with no link. I need to modify that so it check for 2 strings, "sc0" and "fj" I cant seem to get the php syntax correct. Does php support something like:
if (condition1 or condition2) then
do nifty stuff here...
endif
So if you guys can help me with the syntax changes, it would be really appreciated!!!!
thanks!