Home >Backend Development >PHP Tutorial >这样的PHP正则表达式该如何写

这样的PHP正则表达式该如何写

WBOY
WBOYOriginal
2016-06-13 10:33:32904browse

这样的PHP正则表达式该怎么写
我在一个php页面已经定义"page_id":
 $page_id=101;
?>

现在要在当前页面,利用php变量定义这样一个class:

style+page_id
{
  background:url(../AsABimgs/nav_bg1.gif) no-repeat 0 0; 
  font-weight:bold; 
  color:#fff;
}

刚接触PHP,实在不知道这个CLASS用PHP格式该怎么写才正确。

------解决方案--------------------

PHP code
<style><?phpecho <<<CSSstyle$page_id{    background:url(../AsABimgs/nav_bg1.gif) no-repeat 0 0;      font-weight:bold;      color:#fff;}CSS;?></style><div class="clear">
                 
              
              
        
            </div>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn