Re: [PHP] Parsing brackets in text
Actually, preg_replace() can solve Dotan Cohen's problem. There was just a minor mistake in the code. Please try this: $title"; return $returnString; } $articleText="This is a very [long] and [stupid] string."; $articleText=preg_replace('/(\[[a-z]+\])/e', "makeLink('$1')", $articleText); pri
Re: [PHP] Use of substr()
function format_text($a, $b) // $a is text to format, from textarea, $b is line length { $line = array(); $limit = (strlen($a)/$b); for($i = 0; $i < $limit; $i++) { $start =