Wednesday, August 1, 2018

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

    plot explanation - Why did Peaches&#39; mom hang on the tree? - Movies &amp; TV

    In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...