note 125052 added to language.variables.variable

From: Date: Wed, 27 May 2020 10:27:57 +0000
Subject: note 125052 added to language.variables.variable
Groups: php.notes 
Request: Send a blank email to php-notes+get-214686@lists.php.net to get a copy of this message
If you want to use Variable Variables with $_POST, you may follow this example: <?php // you created a form with variable names: $_POST['content_1'] = "blabla"; $_POST['content_2'] = "blublu"; // ... $_POST['content_99'] = "bleble"; // Then, you can use a loop: for ($i=1; $i<99;$i++) { echo $_POST["content_$i"]; } ?> ---- Server IP: 45.112.84.4 Probable Submitter: 103.51.166.36 (proxied: 81.185.197.211) ---- Manual Page -- http://php.net/manual/en/language.variables.variable.php Edit -- https://master.php.net/note/edit/125052 Del: integrated -- https://master.php.net/note/delete/125052/integrated Del: useless -- https://master.php.net/note/delete/125052/useless Del: bad code -- https://master.php.net/note/delete/125052/bad+code Del: spam -- https://master.php.net/note/delete/125052/spam Del: non-english -- https://master.php.net/note/delete/125052/non-english Del: in docs -- https://master.php.net/note/delete/125052/in+docs Del: other reasons-- https://master.php.net/note/delete/125052 Reject -- https://master.php.net/note/reject/125052 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#214686) next »