<code><span>$configData</span>=<span>array</span>( <span>'1'</span>=><span>'11111111000111111'</span>, <span>'3'</span>=><span>'22222222000222222'</span>, <span>'4'</span>=><span>'33333333000333333'</span>, <span>'5'</span>=><span>'44444444000444444'</span>, <span>'6'</span>=><span>'55555555000555555'</span>, <span>'7'</span>=><span>'66666666000666666'</span>, <span>'7'</span>=><span>'77777777000777777'</span>, <span>'9'</span>=><span>'77777777000777777'</span>, ); <span>foreach</span>(<span>$configData</span><span>as</span><span>$key</span>=>&<span>$val</span>){ <span>$val</span>=str_replace(<span>'000'</span>,<span>'A'</span>,<span>$val</span>); <span>echo</span><span>$val</span>.<span>'<br/>'</span>; } <span>echo</span><span>'<pre class="brush:php;toolbar:false">'</span>; var_dump(<span>$configData</span>);</code>
The above introduces [php] the technique of using str_replace to replace strings in logarithms, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.