phpquery创建div并设置标题

时间:2018-08-01 13:30:23

标签: dom phpquery

php / phpquery:我想动态生成bootstrap 3手风琴

DECLARE @ExpressionToSearch VARCHAR(50) 
SET @ExpressionToSearch = 'TMS_Customers'
IF  CHARINDEX('_', @ExpressionToSearch ) > 0 
    PRINT 'Yes it Contains'
ELSE
    PRINT 'It doesn''t Contain'

DECLARE @sep CHAR(1) = '_'
SET @ExpressionToSearch = @sep+@ExpressionToSearch +@sep;

SELECT SUBSTRING(@ExpressionToSearch,N+1,CHARINDEX(@sep,@ExpressionToSearch,N+1)-N-1) AS [Value]
FROM (
 SELECT N FROM (VALUES (1),(2),(3),(4),(5),(6)) t(N)) t
WHERE N < LEN(@ExpressionToSearch) AND 
SUBSTRING(@ExpressionToSearch,N,1) = @sep;

不起作用。

通过在创建时设置临时类属性并将其删除,我发现了一个转机,但这确实使代码很胖:

$doc = phpQuery::newDocument();
phpQuery::selectDocument($doc);
pq($doc)->append('<div></div>')->attr("id","accordion2")->attr("class","panel-group");

感谢您的帮助

0 个答案:

没有答案