How to send two values per parameter with a single selected option? PHP

4

I need to send two values per parameter to another page, but the value field of the select tag only sends a ... How could I send two?

Follow the code:

<option value="<?php echo $data->format("d/m/Y"); ?>">
     <?php echo $data->format("d/m/Y").' às 14:15'; ?>
</option>
    
asked by anonymous 01.12.2014 / 23:17

2 answers

3

An alternative is you do not specify the value , in this case the contents of <option> will be passed, for example:

<option>
    <?php echo $data->format("d/m/Y") . ' às 14:15'; ?>
</option>
    
01.12.2014 / 23:32
3

You can do this as follows:

<select name="">
    <option value="{'num_sequence':[0,1,2,3]}">Passando Por Array</option>
    <option value="{'foo':'bar','one':'two'}">Passando por Objeto</option>
</select>
    
01.12.2014 / 23:35