Php how to add br in php

In Solution 2, I encountered the same issue and found a solution. Instead of the default configuration of fancybox, you can make the following change. By doing so, you will be able to use HTML in the fancybox title attribute. It is important to note the presence of the tag within the title attribute. Additionally, it is worth mentioning that HTML attributes cannot include HTML content within them.

Solution 1:

Use str_replace():

echo str_replace(",", "
", get_post_meta($postid, 'colors', true));

Solution 2:

To incorporate


following a comma, follow these steps.

$text = preg_replace("/,/", "
", get_post_meta($postid, 'colors', true));

Solution 3:

str_replace(", "    ,    ", 
" , $string) ;

The arrangement is as follows: the starting point, the endpoint, and the description.

Frequently Asked Questions

Posted in Php