note 129662 added to control-structures.goto

From: Date: Mon, 22 Jul 2024 12:21:40 +0000
Subject: note 129662 added to control-structures.goto
Groups: php.notes 
Request: Send a blank email to php-notes+get-221434@lists.php.net to get a copy of this message
You can use goto to hide large HTML blocks without using echo(): <html><body> <?php if ($hide_form_and_script) { goto label_1;} ?> <form action="" method="post"> <!-- some HTML here --> </form> <script> let a='test'; // no need to escape nested quotes as with echo() // some JavaScript here </script> <?php label_1: ?> </body></html> ---- Server IP: 45.112.84.4 Probable Submitter: 45.112.84.18 (proxied: 207.204.228.49) ---- Manual Page -- https://php.net/manual/en/control-structures.goto.php Edit -- https://main.php.net/note/edit/129662 Del: integrated -- https://main.php.net/note/delete/129662/integrated Del: useless -- https://main.php.net/note/delete/129662/useless Del: bad code -- https://main.php.net/note/delete/129662/bad+code Del: spam -- https://main.php.net/note/delete/129662/spam Del: non-english -- https://main.php.net/note/delete/129662/non-english Del: in docs -- https://main.php.net/note/delete/129662/in+docs Del: other reasons-- https://main.php.net/note/delete/129662 Reject -- https://main.php.net/note/reject/129662 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#221434) next »