var sidebar_align = 'right';
var content_container_margin = parseInt('350px');
var sidebar_width = parseInt('330px');
ok im makeing a reviews script for someone
and i want them to be able to use bbcode in their posts instead of html.
I am using str_replace() to do this, but i have a problem.
i can do this fine :
but how do you do it if you want to change not only [b] to <b> but and to <b> and </b> in one go?
$reviews_post = str_replace("[b]", "<b>", $reviews_post);
ok that post has come out all wrong because it is converting the bbcode to bold
is there not a way to turn it off in a post?
I you want to show bbcode in a post you can place bbcode in a bbcode to break it up; like this: [B]wassup![/B] (quote me and see what i mean)
From Manual: In PHP 4.0.5 and later, every parameter to str_replace() can be an array.
That might mean that this will work:
str_replace (array('[b[I][/I]]', '[[I][/I]/b]') , array(<b>', '</b>') ,$str) ;