PDA

View Full Version : IF argument for [...]


TECK
05-04-2002, 09:27 AM
i tried this: if (strlen($thread[pagetext]) > 100) {
$thread[message]=substr($thread[pagetext], 0, 95).'[...]';
} else {
//$thread[message]=bbcodeparse($thread[pagetext],$forum[forumid],1);
$thread[message]=$thread[pagetext];
}
if (condition) {
$thread[message]=(here is my prob)
} else {
$thread[message]=preg_replace("/\[[^\]]*\]/","",$thread[message]);
$thread[message]=str_replace("\"","",$thread[message]);
}this will prevent to load the BBcode in the text i want to show. however, i have the [...] code segment that will be removed also. an easy fix is to replace the brackets like that:
(...)

is there a way to keep the [...] format with an IF argument? thanks.