Hi,
I have a 'string' that contains three pieces of information. I need to put each of those pieces of information into a separate variable so I can insert them into three seperate fields in a database table.
Here is what I'm trying to do:
<?php
$string = explode(';', first,second,third);
$i=1;
foreach ($string as $variable) {
$v_$i = "$variable";
$i++;
}
// And then use $v_1, $v_2, and $v_3 as variables in a query string.
?>
Unfortunately this creates a PHP error. Does anyone know how to do this?
Thanks for your time,