Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP String Replace
    primarykey
    data
    text
    <p>I've got a page that pulls through categories. However I have a charset issue in that all the bulleted items in the list are coming through as "•" so what I'd like to do is replace them with the correct HTML Enc Type of "&#x2022;" </p> <p>I've created script that can ECHO this out, BUT I need to try and achieve this on page load if possible?? So any ideas appreciated.</p> <p>My code is : </p> <p>[PHP]</p> <pre><code>&lt;?php $search = array("•"); $replace = array("&amp;#x2022;"); ?&gt; </code></pre> <p>[HTML]</p> <pre><code>&lt;span style="color: rgb(255, 255, 255); font-size: 14pt;"&gt;&lt;span style="font-family: Verdana;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Verdana; color: rgb(186, 66, 101); font-weight: bold;"&gt;&lt;br /&gt; &lt;br /&gt; •&lt;/span&gt;&lt;span style="font-family: Verdana; color: rgb(105, 105, 105);"&gt;&lt;span style="color: rgb(105, 105, 105);"&gt;&lt;span style="color: rgb(186, 66, 101);"&gt;&lt;/span&gt; &lt;span style="font-size: 8pt;"&gt;Impellers for drinks mixers&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;br style="font-family: Verdana; color: rgb(105, 105, 105);" /&gt; &lt;span style="font-family: Verdana; color: rgb(186, 66, 101); font-weight: bold;"&gt;•&lt;/span&gt;&lt;span style="font-family: Verdana; color: rgb(105, 105, 105);"&gt;&lt;span style="color: rgb(105, 105, 105);"&gt;&lt;span style="color: rgb(186, 66, 101);"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Verdana; color: rgb(105, 105, 105);"&gt; &lt;span style="font-size: 8pt;"&gt;Additional malt cups.&lt;/span&gt; &lt;/span&gt;&lt;br style="font-family: Verdana; color: rgb(105, 105, 105);" /&gt; &lt;span style="font-family: Verdana; color: rgb(186, 66, 101); font-weight: bold;"&gt;•&lt;/span&gt;&lt;span style="font-family: Verdana; color: rgb(105, 105, 105);"&gt;&lt;span style="color: rgb(105, 105, 105);"&gt;&lt;span style="color: rgb(186, 66, 101);"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Verdana; color: rgb(105, 105, 105);"&gt; &lt;span style="font-size: 8pt;"&gt;Blender containers&lt;/span&gt;&lt;/span&gt;.&lt;br style="font-family: Verdana; color: rgb(105, 105, 105);" /&gt; &lt;span style="font-family: Verdana; color: rgb(105, 105, 105);"&gt;&lt;span style="color: rgb(255, 69, 0);"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="font-family: Verdana;"&gt;&lt;span style="color: rgb(91, 91, 91);"&gt;&lt;br /&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;?php echo str_replace($search,$replace,"•"); ?&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload