<code><span><span>function</span><span>console_log</span><span>(<span>$data</span>)</span>{</span><span>if</span> (is_array(<span>$data</span>) || is_object(<span>$data</span>)){ <span>echo</span>(<span>"<script>console.log('"</span>.json_encode(<span>$data</span>).<span>"');</script>"</span>); } <span>else</span> { <span>echo</span>(<span>"<script>console.log('"</span>.<span>$data</span>.<span>"');</script>"</span>); } } </code>
The above introduces the method of printing PHP information, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.