Q: PHP show text up to /*show more text*/ I would like to only show the text that is before /*SHOW MORE TEXT*/ However I am unsure how to do such a thing because my text is like this:
<ul>
<li>show this</li>
<li>show this</li>
/*SHOW MORE TEXT*/
<li>don't show this</li>
</ul>

I have tried
$texts = explode("/*SHOW MORE TEXT*/", $text);

But the issue with this is then it won't fix the </ul>
How can I fix this small issue?

A: One possible solution is as follows:
Don't include ul tags in the text string, and then use explode and take the first element of array using array[0] and close </ul> tag.

A: Just try with Jquery toggle functions it's more easier and faster. Here you find details: http://api.jquery.com/toggle/

A: Using php you can do this like  
<ul>
<li></li>
<?php 
if(condition is true){
  echo "<li>text will be displayed if condition is true otherwise it will not displayed</li>";
}
?>
</ul>

using javascript you can use   
<li style="display:none;">this will not visible</li>


A: you can use display:none; property for that and later when you need it you can display it using java script. 
<li style="display:none;">don't show this</li>

