You are here: Include <? ?> in string literal « PHP Programming Language « IT news, forums, messages
Include <? ?> in string literal

Posted by Paul E Collins on 01/25/07 07:22

I want to programmatically remove any <?...?> section occurring on a
single line. However, my regular expression needs to contain ?> and
that causes the interpreter to choke with a parse error. What's the
standard way to include ?> in a string?

My current (failing) attempt is:

$line = preg_replace('/<\?.*?\?>/', '', $line);

Eq.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация