Hi,
I was hoping someone could help me with the following.
I have this.
$string[] = "a, 10, one";
$string[] = "b, 20, two";
if ($_POST[input] == "a")
{
$item[0] = "a";
$item[1] = "10";
$item[2] = "one";
}
I hope you understand what I'm trying to accomplish.
I have several strings in identical format. id, quantity, name.
If a visitor enters a specific id, I'd like to be able to get all the information associated with that particular id in the format i have above.
I got this from php.net
<?
$string= "a, 10, one";
$tok = strtok($string,",");
while ($tok)
{
echo "Word=$tok<br>";
$tok = strtok(",");
}
echo $string;
?>