Explode function do not work on $this->item->text

Everything to do with Joomla! 4.x templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 192
Joined: Tue Sep 27, 2005 7:27 am

Explode function do not work on $this->item->text

Post by zorro128 » Thu Sep 16, 2021 8:13 pm

I am trying to add a module after second p tag inside article.

But explode function does not find any p tag inside $this->item->text.

This is the code i use:

Code: Select all

$tmp = explode("<p>",$this->item->text,2);

Post Reply

Return to “Templates for Joomla! 4.x”