Home > Backend Development > PHP Problem > What to do if a line in php is too long

What to do if a line in php is too long

藏色散人
Release: 2023-03-10 15:14:01
Original
2424 people have browsed it

If a line of php is too long, you can write it directly by carriage return and line feed, because in PHP, you can directly wrap the line without a connector; and in php, the code ends the statement with a semicolon.

What to do if a line in php is too long

The operating environment of this article: windows7 system, PHP7.1 version, DELL G3 computer

What should I do if a line of php is too long?

Press Enter directly, php ends the statement with a semicolon.

In PHP, you can directly wrap the line without a connector, as follows:

<?php
$requestPage = $_REQUEST[&#39;page&#39;];
if ("ipConfig" == $requestPage)
{
    $json = &#39;{
                "mac-address": "00:04:A3:22:18:FD",
                "host-name": "TRIAD",
                "dhcp-enable": "1",
                "ip-address": "192.168.200.40",
                "gateway": "192.168.200.254",
                "sub-mask": "255.255.255.0",
                "primary-dns": "192.168.200.2",
                "secondary-dns": "192.168.200.8"
             }&#39;;
}
echo $json;
?>
Copy after login

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of What to do if a line in php is too long. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template