RE: [PHP] highlight_string()

2006-03-10 Thread Weber Sites LTD
('/\?php(.*?)\?/i',$text,$CodeArray,PREG_PATTERN_ORDER); Thanks. -Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 07, 2006 3:08 AM To: Weber Sites LTD Cc: php-general@lists.php.net Subject: Re: [PHP] highlight_string() Weber Sites LTD wrote: I was afraid

Re: [PHP] highlight_string()

2006-03-10 Thread chris smith
-general@lists.php.net Subject: Re: [PHP] highlight_string() Weber Sites LTD wrote: I was afraid of that... I need to do HTML manipulations on the text that is outside the ??. After I run highlight_string the original text is messed up. If I run the manipulations before

Re: [PHP] highlight_string()

2006-03-10 Thread Robin Vickery
On 10/03/06, Weber Sites LTD [EMAIL PROTECTED] wrote: Hi I'm trying to go with your idea but I'm having difficulties with preg_match_all. I want the text between ?php and ?. The use of preg_match_all bellow only Returns text that is in a single line. If the php is on one line and the ? is

RE: [PHP] highlight_string()

2006-03-10 Thread Weber Sites LTD
: php-general@lists.php.net Subject: Re: [PHP] highlight_string() On 3/10/06, Weber Sites LTD [EMAIL PROTECTED] wrote: Hi I'm trying to go with your idea but I'm having difficulties with preg_match_all. I want the text between ?php and ?. The use of preg_match_all bellow only Returns text

RE: [PHP] highlight_string()

2006-03-06 Thread Weber Sites LTD
@lists.php.net Subject: [PHP] highlight_string() Hi From what I see, highlight_string() should only change text between ? And ?. Any idea why it highlights all of the text I send to it (even text outside ? And ? ? Thanks berber -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] highlight_string()

2006-03-06 Thread chris smith
On 3/6/06, Weber Sites LTD [EMAIL PROTECTED] wrote: The only way I could work around this was to put empty ?? at the Beginning of the text and now highlight_string() highlights only what Is inside ? ? You can see an example of the problematic text in the example Area of this page :

RE: [PHP] highlight_string()

2006-03-06 Thread gustav
@lists.php.net Subject: [PHP] highlight_string() Hi From what I see, highlight_string() should only change text between ? And ?. Any idea why it highlights all of the text I send to it (even text outside ? And ? ? Thanks berber -- PHP General Mailing List (http://www.php.net

RE: [PHP] highlight_string()

2006-03-06 Thread Weber Sites LTD
[mailto:[EMAIL PROTECTED] Sent: Monday, March 06, 2006 11:59 AM To: Weber Sites LTD Cc: php-general@lists.php.net Subject: Re: [PHP] highlight_string() On 3/6/06, Weber Sites LTD [EMAIL PROTECTED] wrote: The only way I could work around this was to put empty ?? at the Beginning of the text

Re: [PHP] highlight_string()

2006-03-06 Thread Chris
= $text) { $content = str_replace('%%PLACEHOLDER['.$i.']%%', highlight_string($text), $content); } -Original Message- From: chris smith [mailto:[EMAIL PROTECTED] Sent: Monday, March 06, 2006 11:59 AM To: Weber Sites LTD Cc: php-general@lists.php.net Subject: Re: [PHP] highlight_string

[PHP] highlight_string for VB, CPP or .NET source code?

2003-02-18 Thread stefen Lars
Hello all PHP offers the fantastic function ‘highlight_string’ to highlight PHP source code. I was wondering whether anyone had written a function to highlight Visual Basic, CPP or .NET source code. Alternatively, would anyone have any suggestions on how to write such a function. Ideally,

[PHP] highlight_string parsing in an article

2001-03-16 Thread Jason Lotito
Okay, I have a bugger here. I am working on a script for my site to parse articles, comments, so that people use a special markup (like [b] [/b] for b /b, etc). One of the feature I want to implement is a [code] feature that will parse the code between [code] and [/code] like it would in