daveoffy Posted November 15, 2008 Share Posted November 15, 2008 I have a drop down menu <select name="service"> <option value="10 Page Basic Site|$125">10 Page Basic Site: $125</option> </select> I have it set so when they select that option it uploades the value to the database. I want it to upload the value before | to services (what it does now) and want the $125 to get uploaded to price. I can edit the PHP, I just need a good example. Link to comment https://forums.phpfreaks.com/topic/132786-php-split/ Share on other sites More sharing options...
DarkWater Posted November 15, 2008 Share Posted November 15, 2008 Just use explode(): if (isset($_POST['service'])) { list($services, $price) = explode("|", $_POST['service']); } Link to comment https://forums.phpfreaks.com/topic/132786-php-split/#findComment-690570 Share on other sites More sharing options...
daveoffy Posted November 15, 2008 Author Share Posted November 15, 2008 Worked like a charm. Thanks DarkWater Link to comment https://forums.phpfreaks.com/topic/132786-php-split/#findComment-690593 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.