Below is the actual code being run.
function parse_connect_string ($connstring)
{
$exploded_string = explode(";",$connstring);
//debug
var_dump($exploded_string);
echo "<br>";
//------------
foreach($exploded_string as $param){
//debug
var_dump($param);
echo "<br>";
//----------------
list($key, $value) = split("=",$param);
if (isset($this->{$key})) {
$this->{$key} = $value;
}
if (!$this->dbname == "") {
$this->ActiveDB = $this->dbname;
}
}
Below is the output of the dump:
array(4) { [0]=> string(14) "host=localhost" [1]=> string(7) "user=me" [2]=>
string(14) "pwd=mypassword" [3]=> string(11) "dbname=mydb" }
array(2) { [0]=> string(14) "host=localhost" [1]=> int(0) }
array(2) { [0]=> string(7) "user=me" [1]=> int(1) }
array(2) { [0]=> string(14) "pwd=mypassword" [1]=> int(2) }
array(2) { [0]=> string(11) "dbname=mydb" [1]=> int(3) }
you can also see the actual output at the following address:
https://128.241.54.143/easyauthnet/e...order_form.php
"Jacob Atzen" <ja***@aub.dk> wrote in message
news:sl*******************@tank.aub.dk...
On 2005-04-06, Patrick Russell <pr******@snpent.com> wrote: Based on the replies, I created a test php script and it works, but the
original script still errors. Below are the var_dump results.
var_dump($exploded_string) =
array(3) { [0]=> string(11) "Param1=Val1" [1]=> string(11) "Param2=Val2"
[2]=> string(11) "Param3=Val3" }
var_dump($param) =
array(2) { [0]=> string(11) "Param1=Val1" [1]=> int(0) } var_dump of
$param
array(2) { [0]=> string(11) "Param2=Val2" [1]=> int(1) } var_dump of
$param
array(2) { [0]=> string(11) "Param3=Val3" [1]=> int(2) } var_dump of
$param
This really makes no sense at all. Please show the actual code producing
the bug with var_dump()'s inserted and also the output from a run of
said code.
--
Cheers
- Jacob Atzen