Note that there are some explanatory texts on larger screens.

plurals
  1. POStrict standards: Only variables should be passed by reference in get_id.php on line 27
    primarykey
    data
    text
    <p>i get the following notice in php : Strict standards: Only variables should be passed by reference in get_id.php on line 27</p> <p>the code is :</p> <pre><code>&lt;?php function truncate($text, $length, $suffix ='', $isHTML = true) { $i = 0; $simpleTags=array('br'=&gt;true,'hr'=&gt;true,'input'=&gt;true,'image'=&gt;true,'link'=&gt;true,'meta'=&gt;true); $tags = array(); if($isHTML){ preg_match_all('/&lt;[^&gt;]+&gt;([^&lt;]*)/', $text, $m, PREG_OFFSET_CAPTURE | PREG_SET_ORDER); foreach($m as $o){ if($o[0][1] - $i &gt;= $length) break; $t = substr(strtok($o[0][0], " \t\n\r\0\x0B&gt;"), 1); // test if the tag is unpaired, then we mustn't save them if($t[0] != '/' &amp;&amp; (!isset($simpleTags[$t]))) $tags[] = $t; elseif(end($tags) == substr($t, 1)) array_pop($tags); $i += $o[1][1] - $o[0][1]; } } // output without closing tags $output = substr($text, 0, $length = min(strlen($text), $length + $i)); // closing tags $output2 = (count($tags = array_reverse($tags)) ? '&lt;/' . implode('&gt;&lt;/', $tags) . '&gt;' : ''); // Find last space or HTML tag (solving problem with last space in HTML tag eg. &lt;span class="new"&gt;) $pos = (int)end(end(preg_split('/&lt;.*&gt;| /', $output, -1, PREG_SPLIT_OFFSET_CAPTURE))); // Append closing tags to output $output.=$output2; // Get everything until last space $one = substr($output, 0, $pos); // Get the rest $two = substr($output, $pos, (strlen($output) - $pos)); // Extract all tags from the last bit preg_match_all('/&lt;(.*?)&gt;/s', $two, $tags); // Add suffix if needed if (strlen($text) &gt; $length) { $one .= $suffix; } // Re-attach tags $output = $one . implode($tags[0]); //added to remove unnecessary closure $output = str_replace('&lt;/!--&gt;','',$output); return $output; } ?&gt; </code></pre> <p>how do i remove this notice.. Please Help. I am using WampServer 2.4. This notice won't show in older version and in linux hosting. but the new wampserver shows this notice. Thanks in advance...</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload