Hi, i have this code to split some text using the explode function
However, it only pics up the first word, how do i make it pick up all the words after the first command??
e.g. type admin_closesite 1 "reason here"
it picks up the admin_closesite 1 but it would only pick up the word reason, not reason here?
How do i make it pick all words after inside the ""'s??
any ideas??
Regards,
Martin
Computing Help And Info:
Code:
<?php
$cmd = $_POST['theCmd'];
$bs = $_POST['beenSub'];
if($bs == "yes"){
$doCmd = explode(" ", $cmd);
$command = "Command used: " . $doCmd[0] . " " .$doCmd[1]. " Reason: " . $doCmd[2];
}
?>
Code:
<form name="CLI" action="index.php" method="post">
<input name="theCmd" type="text" id="theCmd" size="100%">
<input type="hidden" name="beenSub" value="yes">
</form>
e.g. type admin_closesite 1 "reason here"
it picks up the admin_closesite 1 but it would only pick up the word reason, not reason here?
How do i make it pick all words after inside the ""'s??
any ideas??
Regards,
Martin
Computing Help And Info: