Tuesday 24 May 2016

php - Regexp for html







I have the following string:




$str = " 
  • r

  • a

  • n

  • d

  • ...
  • om

  • ";



    How do I get the HTML for the first n-th

  • tags?



    Ex : n = 3 ; result = "
  • r<...>n
  • ;


    I would like a regexp if possible.

  • No comments:

    Post a Comment

    c++ - Does curly brackets matter for empty constructor?

    Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...