I am assuming you meant after submission to a PHP script.
I just threw this together and have not tested it yet, but looks fairly straight forward.
It will also work with <input type=checkbox name="c[]">, but just a little apprehensive about the text and checkbox synchronization with the array.
HTML
<form action="./chkbx.php" method=GET>
<input type=checkbox name="c1" value="1"/>
<input type="text" name="t1" />
<input type=checkbox name="c2" value="2"/>
<input type="text" name="t2" />
<input type=checkbox name="c3" value="3"/>
<input type="text" name="t3" >
<input type="submit" name='Submit' />
</form>
PHP
foreach ($_GET as $key => $val){
$chk[substr($key,0,1)] = intval(substr($key,1,1));
$txt[substr($key,0,1)][intval(substr($key,1,1))] = $val;
}
echo '<h2>Text=' . $txt['t'][$chk['c']] . '<h2>';
Test Code
<?php
echo <<<EOT
<!DOCTYPE html>
<html lang="en"><head><title>Menu Test</title><meta name="viewport" content="width=device-width, initial-scale=1.0" />
<style type="text/css">
</style></head><body>
<form action="./chkbx.php" method=GET>
<input type=checkbox name="c1" value="1"/>
<input type="text" name="t1" />
<input type=checkbox name="c2" value="2"/>
<input type="text" name="t2" />
<input type=checkbox name="c3" value="3"/>
<input type="text" name="t3" >
<input type="submit" name='Submit' />
</form>
EOT;
foreach ($_GET as $key => $val){
$chk[substr($key,0,1)] = intval(substr($key,1,1));
$txt[substr($key,0,1)][intval(substr($key,1,1))] = $val;
}
echo '<h2>' . $txt['t'][$chk['c']] . '<h2>';
echo '<pre>';
var_export($chk);
echo"-------------------\n";
var_export($txt);
echo '</pre></body></html>';
Results:
With checkbox c2 checked and text boxes containing "Text One" "Text Two" "Text Three"

Below output from is the echo '<h2>Text=' . $txt['t'][$chk['c']] . '<h2>';
Text Two
$chk (
't' => 3,
'c' => 2,
'S' => 0,
)-------------------
$txt (
't' =>
array (
1 => 'Text One',
2 => 'Text Two',
3 => 'Text Three',
),
'c' =>
array (
2 => '2',
),
'S' =>
array (
0 => 'Submit',
),
)
Summary:
The submitted check box value is stored in $chk['c']
The submitted Text is in $txt['t'][0], $txt['t'][2], $txt['t'][3] respectfully.
So the text can be retrieved by $txt['t'][$chk['c']
Loop and echo executed in 0.000054 seconds. 54 micro seconds, not too bad.