Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php html text before first h2 tag

protected function firtsText(string $postContent): string {
        $explotion = explode("<h2>", $postContent);
        $firstText = $explotion[0];
  		return $explotion[0];
   }
 
PREVIOUS NEXT
Tagged: #php #html #text #tag
ADD COMMENT
Topic
Name
7+6 =