伙计们我只想问是否有可能:例如,$currenttext = "someexamplepls";
如果您想要显示或打印它只是使用,print "$currenttext";那么准备好的输出看起来像这样someexamplepls.我的问题是,如果我想像这样打印它:
somee
xampl
epls
Run Code Online (Sandbox Code Playgroud)
在每5个字符中都有自动换行符我该怎么办?
<style>
#table{
display:table;
}
#table div.row{
display:table-row;
}
#table div.row div{
display:table-cell;
width:100px;
text-align:right;
}
#table div.row:first-child{
color:white;
background-color:blue;
}
#table div.row:last-child{
color:white;
background-color:green;
}
#table div.row:last-child{
display:none;
}
#table div.row:hover{
display:table-row;
}
</style>
<div id='table'>
<div class='row'>
<div>CELL</div><div>CELL</div><div>CELL</div>
</div>
<div class='row'>
<div>CELL</div><div>CELL</div><div>CELL</div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
我不能摆脱我的任务,在那里,我们将制作一个2行的表,在默认视图中只有一行,因为最后一行是隐藏的(显示:无),然后当你将鼠标悬停在表格第二行会出现,我不知道我的CSS有什么错误?你觉得这行CSS是我错误的来源吗#table div.row:hover {display:table-row;},谢谢你的到来.
我收到此错误:-
严格的标准:只有变量应该通过引用传递
……我不知道发生了什么;这段代码中发生了错误:
public function prepare_items() {
$columns = $this->get_columns();
$hidden = array();
$sortable = $this->get_sortable_columns();
$this->_column_headers = array($columns, $hidden, $sortable);
$this->items = $this->flagged_message();
usort( $this->flagged_message(), array( &$this, 'usort_reorder' ) );
$this->items = $this->flagged_message();
}
Run Code Online (Sandbox Code Playgroud)
这行是错误:
usort( $this->flagged_message(), array( &$this, 'usort_reorder' ) );
Run Code Online (Sandbox Code Playgroud)
其flagged_message()功能是:
public function flagged_message(){
global $wpdb;
$improper_contents = $wpdb->get_results( $wpdb->prepare("SELECT comment_id FROM pw_commentmeta WHERE meta_key = 'flag_this_message' AND meta_value = '%d'", $this->flagged_id) );
$flagged = [];
if($improper_contents){
foreach ($improper_contents as $improper_content_arr) {
$comment_id = (int)$improper_content_arr->comment_id; …Run Code Online (Sandbox Code Playgroud)